| ------ |
| Guide to Building Maven |
| ------ |
| Brett Porter |
| Jason van Zyl |
| ------ |
| 2015-01-04 |
| ------ |
| |
| ~~ Licensed to the Apache Software Foundation (ASF) under one |
| ~~ or more contributor license agreements. See the NOTICE file |
| ~~ distributed with this work for additional information |
| ~~ regarding copyright ownership. The ASF licenses this file |
| ~~ to you under the Apache License, Version 2.0 (the |
| ~~ "License"); you may not use this file except in compliance |
| ~~ with the License. You may obtain a copy of the License at |
| ~~ |
| ~~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~~ |
| ~~ Unless required by applicable law or agreed to in writing, |
| ~~ software distributed under the License is distributed on an |
| ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| ~~ KIND, either express or implied. See the License for the |
| ~~ specific language governing permissions and limitations |
| ~~ under the License. |
| |
| ~~ NOTE: For help with the syntax of this file, see: |
| ~~ http://maven.apache.org/doxia/references/apt-format.html |
| |
| Building Maven |
| |
| * Why would I want to build Maven? |
| |
| Building Maven yourself is for one of two reasons: |
| |
| * to try out a bleeding edge feature or bugfix (issues can be found in |
| {{{/issue-tracking.html} JIRA}}), |
| |
| * to fix a problem you are having and submit a patch to the developers team. |
| |
| 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. |
| |
| * Checking out the sources |
| |
| 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 |
| {{{/source-repository.html}https://maven.apache.org/source-repository.html}}. |
| |
| * Building Maven |
| |
| ** Building a Maven Plugin or Component |
| |
| Building a Maven plugin or component is like any Maven build: |
| |
| +-----+ |
| mvn install |
| +-----+ |
| |
| Before submitting a patch, it is advised to run the integration tests, which are available in a profile: |
| |
| +-----+ |
| mvn -Prun-its install |
| +-----+ |
| |
| ** Building Maven With Maven Installed |
| |
| 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: |
| |
| +-----+ |
| mvn install |
| +-----+ |
| |
| The assemblies will be created in <<<apache-maven>>>, and can be unzipped to the location where you'd like Maven installed. |
| |
| ** Running the full Maven core integration tests |
| |
| 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-its/core-it-suite/}Core IT Suite documentation}} for more options. |