Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install jars in maven repository which is eclipse embedded?

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?

like image 954
Dinesh Avatar asked Dec 01 '10 11:12

Dinesh


People also ask

What is the command to install jar in Maven local repository?

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).

Can we download jar from Maven repository?

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.


1 Answers

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

like image 58
darwin Avatar answered Oct 09 '22 18:10

darwin