This document describes how to get started into developing Maven itself. There is a separate page describing how to build Maven.
First of all you need something to work on! Issues can be found in several JIRA projects.
When you find a issue you would like to work on add a comment in the issue log so the core developers and other people looking for work know that someone is already working on it.
See http://maven.apache.org/source-repository.html for information. The Maven project uses a GIT for some things, and Subversion for others, and this page tracks the situation.
You will find many unit tests in the maven-3 tree. If at all possible, create or modify a unit test to demonstrate the problem, and then validate your fix.
If the problem case can't be set up in the unit tests, add an integration test.
Before submitting a patch, in any case, you should run all of the integration tests. The tests require an empty local repository.
Ant version 1.8+ is recommended.
cd maven export M2_HOME=/place-to-put-test-maven-root ant all (or with -Dmaven.home=/place-to-put-test-maven-root ) cd ../maven-integration-testing rm -rf /tmp/it.repo /place-to-put-test-maven-root/bin/mvn -Prun-its -B -U clean install -Dmaven.repo.local=/tmp/it.repo -Dmaven.home=/place-to-put-test-maven-root
To run a single test, change the last command line to:
cd ../maven-integration-testing/core-it-suite [whatever]/mvn -Dtest=yourit [other options]
When you have either completed an issue or just want some feedback on the work you have done, create a patch and attach the patch to the issue in question. We have a couple of guidelines when creating patches:
An example on how to create a patch from the command line:
$ svn diff > MNG-123-maven-core.patch
If you are picking up an issue with a existing patch attached to the issue you can apply the patch to your working directory directly from JIRA like this. The wget and patch commands will only be available if you are on a UNIX platform or using Cygwin on windows.
$ wget -O - -q <URL to the patch from JIRA> | patch -p0
If the patch is in a local file MNG-123.patch and you want to apply that use this command:
$ patch -p0 < MNG-123.patch
A couple of notes:
Maven has a few dependencies on other projects.
Plexus is a full-fledged container supporting different kinds of component lifecycles. It's native lifecycle is like any other modern IoC container, using field injection of both requirements and configuration. All core Maven functionality are Plexus components.
You can read more about Plexus.
Modello is a simple tool for representing an object model and generate code and resources from the model. Maven is using Modello to generate all Java objects, XML readers and writers, XML Schema and HTML documentation.
You can read more about Modello.
The MojoHaus Project is a plugin forge for non-core Maven plugins. There is also a lower bar for becoming a part of the project.
Surefire is a testing framework. It can run regular JUnit tests so you won't have to change anything in your code to use it. It support scripting tests in BeanShell and Jython and has special "batteries" for writing acceptance and functional tests for the web and for testing XML-RPC code.
You can read more about Surefire.
Doxia is Maven's documentation engine. It has a sink and parser API that can be used to plug in support for input and output documents.
Maven SCM (Source Control Management) is an reusable API which is independent of Maven itself and it is used by the SCM related Maven Plugins. The core part of Maven itself doesn't depend on Maven SCM.
You can read more about Scm.
Maven Wagon is also a standalone API that deals with transporting files and directories. Maven Core uses the Wagon API to download and upload artifacts and artifact metadata and the site plug-in uses it to publish the site.
You can read more about Wagon.