Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mvn package or mvn install [duplicate]

I'm a new developer, never worked with eclipse or java at all in my life, and I'm trying to do something but I'm really clue less. I downloaded a project from github, and in the installation guide it says:

Once you have the sources, run mvn package or mvn install to create 2 jars - hebmorph-core and hebmorph-lucene. Those 2 packages are required before moving on to the next step.

its probably a dumb question, but I cant figure out how to get those jar files. I got lost in the eclipse environment and after few hours of research could found a suitable answer.

there is a direct link to the pom.xml file from git.

Would really appreciate your help.

like image 211
andrey Avatar asked Nov 17 '25 11:11

andrey


2 Answers

When you execute mvn package or mvn install, the generated jars are placed in the target folder. The difference between the two commands is that with mvn install the generated jars are also installed in the local Maven repository, placed by default in the .m2/repository directory inside the user home.

like image 143
JMSilla Avatar answered Nov 20 '25 00:11

JMSilla


Just execute from your main project folder:

mvn package

or

mvn install

package and install are Maven phases.

package - take the compiled code and package it in its distributable format, such as a JAR.

install - install the package into the local repository, for use as a dependency in other projects locally

For more info just follow Introduction to the Build Lifecycle

like image 31
catch23 Avatar answered Nov 20 '25 01:11

catch23