Add flatten maven plugin support

This commit makes sure that poms are cleaned before publishing
This commit is contained in:
Stephane Nicoll 2019-01-29 15:08:41 +01:00
parent 6a5d35f5ab
commit d2033da88a
2 changed files with 30 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
!.mvn/wrapper/maven-wrapper.jar
.flattened-pom.xml
.gradle
*.sw?
.#*

29
pom.xml
View File

@ -186,6 +186,30 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<inherited>true</inherited>
<executions>
<execution>
<!-- Tidy up all POMs before they are published -->
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>oss</flattenMode>
<pomElements>
<parent>expand</parent>
<distributionManagement>remove</distributionManagement>
<repositories>remove</repositories>
</pomElements>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
@ -228,6 +252,11 @@
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.1.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>