Building Maven yourself is for one of two reasons:
Note, that you don't need to bootstrap Maven for day to day use, or to develop plugins. While we encourage getting involved and fixing bugs that you find, for day to day use we recommend using the latest release.
All of the source code for Maven and its related libraries is in managed in the ASF source code repositories. Current development of the core of Maven, and some other components, are in git. Other pieces (and older versions) are in Subversion. For details, see http://maven.apache.org/source-repository.html.
Building a Maven plugin or component is like any Maven build:
Before submitting a patch, it is advised to run the integration tests, which are available in a profile:
mvn -Prun-its install
If you already have Maven installed, it can be faster to build a new version with Maven, rather than a clean bootstrap.
To do this, run from the source directory:
The assemblies will be created in maven-distribution, and can be unzipped to the location where you'd like Maven installed.
If you do not have Maven installed, you can use Apache Ant to build Maven.
Once you have checked out the code, change into the directory that was created.
Set the M2_HOME environment variable to the location that should contain Maven. This directory must be named after the Maven version you want to build and install, for example /usr/local/maven-3.2.x-SNAPSHOT.
export M2_HOME=/usr/local/maven-3.2.x-SNAPSHOT PATH=$M2_HOME/bin:$PATH
set M2_HOME=c:\maven-3.2.x-SNAPSHOT set PATH=%M2_HOME%\bin;%PATH%
From this, run the ant command:
This will download dependencies, build Maven, and install it into the directory you specified as M2_HOME above.
Before checking in a change or submitting a patch to Maven core, it is required to run the integration tests. These live in their own git repository. Using your local build of Maven, run:
mvn install -Prun-its
Consult Core IT Suite documentation for more options.