Configuring Maven in your OS

The latest Eclipse version comes with embedded Maven software already installed. We suggest using the default configuration.

Maven is a software tool for Java project management and build automation. It is similar in functionality to the Apache Ant tool, but is based on different concepts. Maven is hosted by the Apache Software Foundation, where it was formerly part of the Jakarta Project.

Maven uses a process known as a Project Object Model (POM) to describe the software project being built, its dependencies on other external modules and components, and the build order. It comes with pre-defined targets for performing certain well-defined tasks such as compilation of code and its packaging.

More information at http://maven.apache.org.

Install Maven version 3.3.x

Follow the Maven installation guide.

Maven tips

Download sources and Javadoc from library dependencies to improve the developer experience:

$ mvn install -DdownloadSources=true  -DdownloadJavadocs=true

Ignore test failures in the build process this way:

$ mvn install -Dmaven.test.failure.ignore=true

To skip tests, execute the following command:

$ mvn install -Dmaven.test.skip=true

Memory problems

To set more memory for Maven on GNU/Linux, add the Maven executable to the binary path by editing the $HOME/.bashrc file and adding these lines at the end:

export PATH=$PATH:/path/to/maven/installation/bin
export MAVEN_OPTS="-Xmx512m"

On Windows, set it from the general environment variables feature.

Configure Eclipse to use local Maven

Go to Window > Preferences > Maven > Installation and click on the Add button to set your local Maven.

We do not recommend that you apply this change; the default embedded Maven configuration usually works correctly in most cases.