Maven install file in local repository
![maven install file in local repository maven install file in local repository](https://roufid.com/wp-content/uploads/2016/05/eyecatch-maven-700x329.png)
![maven install file in local repository maven install file in local repository](https://www.sneppets.com/wp-content/uploads/2019/05/3rd_party_jar_maven.png)
What happens, is that the Jar Plugin, in a project that has a packaging of jar has a default execution bound to the package phase.
![maven install file in local repository maven install file in local repository](https://robinhowlett.com/assets/images/posts/2019/multi-module-layout.png)
Meaning that the plugin was in fact executed twice.
![maven install file in local repository maven install file in local repository](https://www.onlinetutorialspoint.com/wp-content/uploads/2019/03/How-to-Add-OJDBC-Jat-to-Maven-Repository1.png)
maven-jar-plugin:3.0.2:jar (default) test. If you check the logs with such a configuration, you will have something like: - maven-jar-plugin:3.0.2:jar (default-jar) test. The Jar Plugin is actually getting executed twice with the configuration: Best is to use a repository manager like Nexus, Artifactory or Archiva or if really don't like repository managers (I don't understand why, but this is a different story) you can use Stephen Connolly's non-maven-jar-maven-pluginĪpart from all the above you should use more up-to-date versions of maven-install-plugin which current version number is 2.5.2 Finished at: Sat Oct 25 12:19:30 CEST 2014īUT: I have to say that installing an artifact like you did is bad practice. Installing /home/mvntest/lib/jdom-1.0.jar to /home/.m2/repository/com/soebes/test/jacob/1.1/jacob-1.1.jar maven-install-plugin:2.3.1:install-file (default) test. You have bound the maven-install-plugin to the life-clycle in your pom so you should simply call the life cylce: mvn initalizeĪnd you will get something like the following:. That is the reason why you got the described error message, cause the command line part needs required parameters which you didn't gave on command line.Ĭombination like: mvn install:install-file initialize You should not mix up calling goals without life cylce like install:install-file with life-cycle parts as initialize. If you like to install it as part of the build what you have tried that means you need to call maven like this: mvn package From that point you can use as a usual dependency. The best way to deal with a separated jar is to start using a repository manager and install this jar via the UI into the repository manager. I just want to find out why it doesn't work? Looks like I am messed with phases and goals.įinally I went another way: I placed it into my parent POM, but why it works with parent and doesn't work with child? :maven-install-plugin:2.3.1:install-file are (default-cli) on project MYPROJECTNAME: The parameters 'file' for goal I decided to use Maven Install plugin to install jar into the repo. There are plenty ways to do it: just install manually into local repo, do it with script in parent pom, use system scope, use local repo declaration. What should i do to fix this issue please help me out.I have a local jar and I want to use it in my project.
#Maven install file in local repository full#
Re-run Maven using the -X switch to enable full debug logging.įor more information about the errors and possible solutions, please read the following articles: To see the full stack trace of the errors, re-run Maven with the -e switch.
#Maven install file in local repository code#
Return code is: 503, ReasonPhrase: Service Temporarily Unavailable. When i right click the project and click on clean and build it is giving following error.įailed to execute goal on project saiku-service: Could not resolve dependencies for project org.saiku:saiku-service:jar:2.5: Failed to collect dependencies for : Failed to read artifact descriptor for org.olap4j:olap4j:jar:1.2.0-SNAPSHOT: Could not transfer artifact org.olap4j:olap4j:pom:1.2.0-SNAPSHOT from/to pentaho-third-party ( ): Failed to transfer file. I am trying to compile saiku 2.5 tool on netbeans