My objective is to install a jar file in a Maven repository. This post explains how to do an install with MVN.
But but since I have Maven embedded in Eclipse, I don't know where to run the following command:
mvn install:install-file -Dfile=C:\lib\rest\WadlGenerator.jar \ -DgroupId=foo.in.shop.rest.wadl \ -DartifactId=WadlGenerator \ -Dversion=1.0 \ -Dpackaging=jar \ -DlocalRepositoryPath=C:\maven\repositories\internal
In short: How can I identify the Maven installation directory for Eclipse-embedded Maven?
In this case you can perform mvn initialize and jar will be installed in local maven repo. Now this jar is available during any maven step on this machine (do not forget to include this dependency as any other maven dependency in pom with <dependency></dependency> tag).
Download Jar From maven.org.There is another maven repository that you can download jar files from. Open a web browser and browse the URL maven.org or search.maven.org. Input the jar library group name or artifact name in the search box, it will list all matched jar libraries.
From eclipse you can do:
Run -> Run Configurations -> Maven Build (double click)
Your goal is install:install-file
And also you should fill parameters' keys and values
P. S. But I think that it is more better to have external maven installation in system
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With