Plugin Documentation
This report describes goals, parameters details, requirements and sample usage of this plugin.
Goals
Goals available for this plugin:
Goal | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
flatten:clean | This MOJO realizes the goal flatten:clean that deletes any files created by (more specific the flattened POM file which is by default .flattened-pom.xml ). See also MOJO-2030 for further details. | ||||||||||||||||||||||||||||||
flatten:flatten | This MOJO realizes the goal flatten that generates the flattened POM and #isUpdatePomFile() potentially updates the POM file so that the current org.apache.maven.project.MavenProject 's file points to the flattened POM instead of the original pom.xml file. The flattened POM is a reduced version of the original POM with the focus to contain only the important information for consuming it. Therefore information that is only required for maintenance by developers and to build the project artifact(s) are stripped. Starting from here we specify how the flattened POM is created from the original POM and its project:
| ||||||||||||||||||||||||||||||
flatten:help | Display help information on flatten-maven-plugin.
Call mvn flatten:help -Ddetail=true -Dgoal=<goal-name> to display parameter details. |
System Requirements
The following specifies the minimum requirements to run this Maven plugin:
Maven | 3.6.3 |
JDK | 1.8 |
System Requirements History
The following specifies the minimum requirements to run this Maven plugin for historical versions:
Plugin Version | Maven | JDK |
---|---|---|
from 1.6.0 to 1.7.0 | 3.6.3 | 8 |
1.5.0 | 3.5.4 | 8 |
from 1.3.0 to 1.4.1 | 3.2.5 | 8 |
from 1.0.1 to 1.2.7 | 3.2.5 | 7 |
1.0.0 | 3.1.1 | 5 |
from 1.0.0-beta-1 to 1.0.0-beta-5 | 3.0 | 5 |
Usage
You should specify the version in your project's plugin configuration:
<project>
...
<build>
<!-- To define the plugin version in your parent POM -->
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.7.0</version>
</plugin>
...
</plugins>
</pluginManagement>
<!-- To use the plugin goals in your POM or parent POM -->
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
</plugin>
...
</plugins>
</build>
...
</project>
For more information, see "Guide to Configuring Plug-ins"