#87 - Add Maven Flatten Plugin to clean up POMs on build.

This commit is contained in:
Oliver Drotbohm
2022-09-12 17:46:25 +02:00
parent a656089bb4
commit 36435517a3
2 changed files with 33 additions and 0 deletions

1
.gitignore vendored
View File

@@ -5,3 +5,4 @@
target/
.idea
*.iml
.flattened-pom.xml

32
pom.xml
View File

@@ -310,6 +310,38 @@
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.2.7</version>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>oss</flattenMode>
<pomElements>
<distributionManagement>remove</distributionManagement>
<properties>remove</properties>
<repositories>remove</repositories>
<profiles>remove</profiles>
</pomElements>
</configuration>
</execution>
<execution>
<id>flatten-clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>