Skip to content

Commit d53ded6

Browse files
committed
[#272] Flatten the published POM
1 parent b38ebd5 commit d53ded6

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

pom.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
<version.enforcer.plugin>3.6.2</version.enforcer.plugin>
103103
<version.maven-resources-plugin>3.3.1</version.maven-resources-plugin>
104104
<version.maven-bundle-plugin>6.0.0</version.maven-bundle-plugin>
105+
<version.flatten-maven-plugin>1.7.3</version.flatten-maven-plugin>
105106

106107
<version.testng>7.11.0</version.testng>
107108

@@ -187,6 +188,11 @@
187188
<artifactId>maven-resources-plugin</artifactId>
188189
<version>${version.maven-resources-plugin}</version>
189190
</plugin>
191+
<plugin>
192+
<groupId>org.codehaus.mojo</groupId>
193+
<artifactId>flatten-maven-plugin</artifactId>
194+
<version>${version.flatten-maven-plugin}</version>
195+
</plugin>
190196
</plugins>
191197
</pluginManagement>
192198
<plugins>
@@ -368,6 +374,30 @@ Use is subject to <a href="{@docRoot}/doc-files/speclicense.html" target="_top">
368374
</execution>
369375
</executions>
370376
</plugin>
377+
<plugin>
378+
<groupId>org.codehaus.mojo</groupId>
379+
<artifactId>flatten-maven-plugin</artifactId>
380+
<configuration>
381+
<outputDirectory>${project.build.directory}</outputDirectory>
382+
<!-- Keep things like url, inceptionYear, authors...
383+
everything that's required by Maven Central repository -->
384+
<flattenMode>ossrh</flattenMode>
385+
<pomElements>
386+
<!-- We have some SNAPSHOT repositories,
387+
but there's no point in keeping it listed in the published POM files. -->
388+
<repositories>remove</repositories>
389+
</pomElements>
390+
</configuration>
391+
<executions>
392+
<execution>
393+
<id>flatten-pom</id>
394+
<phase>process-resources</phase>
395+
<goals>
396+
<goal>flatten</goal>
397+
</goals>
398+
</execution>
399+
</executions>
400+
</plugin>
371401
</plugins>
372402
</build>
373403

0 commit comments

Comments
 (0)