Download and Install

To download Maven, go to Maven Downloads website and download the latest Maven version available.

Configure

Once you downloaded and installed, you are good to start using Maven, but there are some configurations that you may want to make to fulfill different requirements.

How to

If you have some jars/artifacts built locally or not available through Maven repository, then you can install them into local repository using below command and use them in POM file.

mvn install:install-file -Dfile=/path/to/jar/file -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging> (jar/war/zip etc);

If there is a pom file that you would like to install into local maven repository, you can install it using below command.

mvn install:install-file -Dfile=/path/to/jar/file -DpomFile=/path/to/pom/file