Skip to content

Commit 69f6238

Browse files
Add flatten-maven-plugin for Sonatype Central Portal (#243)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
1 parent efe77d3 commit 69f6238

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

.gitignore

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

pom.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
<maven-surefire-plugin.argLine />
108108
<maven-failsafe-plugin.argLine />
109109

110+
<flatten-maven-plugin.version>1.7.3</flatten-maven-plugin.version>
110111
<go-offline-maven-plugin.version>1.2.8</go-offline-maven-plugin.version>
111112
<!-- TODO: cleanup any redundant ignores now also in the 4.0 release (once final) -->
112113
<license-maven-plugin.version>4.6</license-maven-plugin.version>
@@ -288,6 +289,12 @@
288289
<artifactId>central-publishing-maven-plugin</artifactId>
289290
<version>${central-publishing-maven-plugin.version}</version>
290291
</plugin>
292+
293+
<plugin>
294+
<groupId>org.codehaus.mojo</groupId>
295+
<artifactId>flatten-maven-plugin</artifactId>
296+
<version>${flatten-maven-plugin.version}</version>
297+
</plugin>
291298
</plugins>
292299
</pluginManagement>
293300

@@ -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)