This document describes how to get started into developing Maven 2 itself. There is a separate page describing how to building Maven 2 .
First of all you need something to work on! Unless you have found a particular issue you would like to work on the Maven team has categorized a few issues that we could use your help to solve them. The list is on our Confluence wiki and will be updated every 60 minutes.
JIRA also has RSS feeds available if you'd like to include those in your favorite feed aggregator.
We categorize the issues in three different categories:
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.
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:
If you've done a chunk of work and you would like ditch your changes and start from scratch use this command to revert to the original checkout:
$ svn revert -R .
The -R argument means that the command will recurse down all directories and revert all changes.
Before committing code to the Subversion repository we always set the svn:ignore property on the directory to prevent some files and directories to be checked in. We always exclude the IDE project files and the target/ directory. Instead of keeping all of the excludes in mind all the time it's useful to put them all in a file and reference the file with the -F option:
$ svn propset svn:ignore -F ~/bin/svnignore .
An example svnignore file:
target *~ *.log .classpath .project *.ipr *.iws *.iml
Maven 2 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 2 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 .
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.
You can read more about Doxia and the currently supported document formats .
"Mojo" is really two things when it comes to Maven. It is both Maven's plug-in API but also a separate Codehaus project hosting these plugins.
The Mojo Project is a plugin forge for all non-core Maven plugins. As we try to keep the Mojos as independent of Maven as possible to increase their reuse we try to keep them a bit away from Maven itself. There is also a lower bar for becoming a part of the project.
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.
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.
Before committing files in subversion repository, you need to read the Committer Subversion Access document and you must set your svn client with this properties file : svn-eol-style.txt
The following sections show how to set up the code style for Maven in IDEA and Eclipse. It is strongly preferred that patches use this style before they are applied.
Download maven-idea-codestyle.xml and copy it to ~/.IntelliJIDEA/config/codestyles then restart IDEA. On Windows, try C:\Documents and Settings<username>\.IntelliJIDEA\config\codestyles
After this, restart IDEA and open the settings to select the new code style.
Download maven-eclipse-codestyle.xml .
After this, select Window > Preferences, and open up the configuration for Java > Code Style > Code Formatter. Click on the button labeled Import... and select the file you downloaded. Give the style a name, and click OK.
Commits should have a message that follows this template:
[issue1, issue2] <<comment>> Submitted by: (when it was a patch, put that persons name there)
issue can be omitted if there was no relevant JIRA issue, though it is strongly encouraged to create one for significant changes.
Submitted by only needs to be specified when a patch is being applied for a non-committer.
[MNG-1456] Added the foo to the bar Submitted by: Baz Bazman