Production Release | Development Release | |
---|---|---|
Install |
Similar plugins
Plugin features
pom.xml
members based on xml tag namespom.xml
with generated pom.xml.flatten
Maven goals
Compare results
Test projects
flatten:flatten
- produce deployment pom.xml.flatten
mvn clean package -P flatten
<profile>
<id>flatten</id>
<build>
<plugins>
<plugin>
<groupId>com.carrotgarden.maven</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<configuration>
<!-- Control dependency resolution. -->
<performDependencyResolve>true</performDependencyResolve>
<includeScope>runtime</includeScope>
<excludeTransitive>false</excludeTransitive>
<!-- Remove these pom.xml members. -->
<performRemoveMembers>true</performRemoveMembers>
<memberRemoveList>
<member>parent</member>
<member>properties</member>
<member>distributionManagement</member>
<member>dependencyManagement</member>
<member>repositories</member>
<member>pluginRepositories</member>
<member>build</member>
<member>profiles</member>
<member>reporting</member>
</memberRemoveList>
<!-- Change published artifact identity. -->
<performOverrideIdentity>true</performOverrideIdentity>
<overrideArtifactId>${project.artifactId}</overrideArtifactId>
<!-- Switch project from pom.xml to pom.xml.flatten. -->
<performSwitchPomXml>true</performSwitchPomXml>
<packagingSwitchList>
<packaging>jar</packaging>
</packagingSwitchList>
</configuration>
<executions>
<!-- Activate "flatten:flatten" during "prepare-package" -->
<execution>
<goals>
<goal>flatten</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
cd /tmp
git clone git@github.com:random-maven/flatten-maven-plugin.git
cd flatten-maven-plugin
./mvnw.sh clean install -B -P skip-test