Forrest logo
back to the mvn tool

mvn:tldr:40c94

mvn: Install the built package in local maven repository. (This will invoke the compile and package commands too).
$ mvn install
try on your machine

The command "mvn install" is executed in the command line interface (CLI) and is used to build and install a Java project with Maven. Here is a breakdown of each component:

  • "mvn" is the command to run Maven. Maven is a build automation tool typically used for Java projects.
  • "install" is a Maven lifecycle phase. When this phase is executed, Maven compiles the Java source code, packages it into a distributable format (such as a JAR or WAR file), and copies the resulting artifact to the local Maven repository (usually located in the user's home directory). The artifact can then be used as a dependency by other projects.

In summary, the "mvn install" command compiles the project, creates a distributable artifact, and installs it in the local Maven repository for future use.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the mvn tool