Skip to content

Commit 8f801ec

Browse files
Add flatten-maven-plugin for Sonatype Central Portal (#233)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
1 parent 95e11f6 commit 8f801ec

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ target/
2424
.classpath
2525
.project
2626
.settings/
27+
28+
# flatten-maven-plugin
29+
.flattened-pom.xml

pom.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
<maven-surefire-plugin.argLine />
101101
<maven-failsafe-plugin.argLine />
102102

103+
<flatten-maven-plugin.version>1.7.3</flatten-maven-plugin.version>
103104
<go-offline-maven-plugin.version>1.2.8</go-offline-maven-plugin.version>
104105
<!-- TODO: cleanup any redundant ignores now also in the 4.0 release (once final) -->
105106
<license-maven-plugin.version>4.6</license-maven-plugin.version>
@@ -300,6 +301,12 @@
300301
<artifactId>central-publishing-maven-plugin</artifactId>
301302
<version>${central-publishing-maven-plugin.version}</version>
302303
</plugin>
304+
305+
<plugin>
306+
<groupId>org.codehaus.mojo</groupId>
307+
<artifactId>flatten-maven-plugin</artifactId>
308+
<version>${flatten-maven-plugin.version}</version>
309+
</plugin>
303310
</plugins>
304311
</pluginManagement>
305312

@@ -531,6 +538,30 @@
531538
<id>release</id>
532539
<build>
533540
<plugins>
541+
<plugin>
542+
<groupId>org.codehaus.mojo</groupId>
543+
<artifactId>flatten-maven-plugin</artifactId>
544+
<configuration>
545+
<flattenMode>ossrh</flattenMode>
546+
</configuration>
547+
<executions>
548+
<execution>
549+
<id>flatten</id>
550+
<phase>process-resources</phase>
551+
<goals>
552+
<goal>flatten</goal>
553+
</goals>
554+
</execution>
555+
<execution>
556+
<id>flatten.clean</id>
557+
<phase>clean</phase>
558+
<goals>
559+
<goal>clean</goal>
560+
</goals>
561+
</execution>
562+
</executions>
563+
</plugin>
564+
534565
<plugin>
535566
<groupId>org.sonatype.central</groupId>
536567
<artifactId>central-publishing-maven-plugin</artifactId>

0 commit comments

Comments
 (0)