

A Maven build produces one or more artifacts, such as a compiled JAR and a "sources" JAR. Apache Maven Install Plugin - Introduction.Īn artifact is a file, usually a JAR, that gets deployed to a Maven repository. Install: install is used to automatically install the project's main artifact (the JAR, WAR or EAR), its POM and any attached artifacts (sources, javadoc, etc) produced by a particular project. Regarding this, what is Mvn install command? If Maven has been installed, you should see something resembling the following output. You need to provide the mvn command with the life cycle phase or goal to execute.īuilds the project and packages the resulting JAR file into the target directory.īuilds the project described by your Maven POM file and installs the resulting artifact (JAR) into your local Maven repositoryĪlso, how do I know if Maven is running? Once Maven is installed, you can check the version by running mvn -v from the command-line. The command should be executed in the directory which contains the relevant pom file.

To build a Maven project via the command line, run the mvn command from the command line.
