Skip to content

Commit b5ce367

Browse files
authored
Merge pull request #138 from bci-oss/137-introduce-consumer-pom
Introduction of consumer vs. build time POMs
2 parents 2324900 + da76a3b commit b5ce367

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ pom.xml.versionsBackup
1212
pom.xml.next
1313
release.properties
1414
dependency-reduced-pom.xml
15+
.flattened-pom.xml
1516
buildNumber.properties
1617
.mvn/timing.properties
1718

pom.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
<lombok-version>1.18.20</lombok-version>
8686
<maven-plugin-annotations-version>3.5</maven-plugin-annotations-version>
8787
<maven-plugin-depdendencies-version>3.3.9</maven-plugin-depdendencies-version>
88+
<maven-plugin-flatten-version>1.2.7</maven-plugin-flatten-version>
8889
<maven-plugin-plugin-version>3.6.4</maven-plugin-plugin-version>
8990
<maven-plugin-testing-harness-version>3.3.0</maven-plugin-testing-harness-version>
9091
<rgxgen-version>1.3</rgxgen-version>
@@ -362,6 +363,11 @@
362363
<artifactId>build-helper-maven-plugin</artifactId>
363364
<version>${build-helper-maven-plugin-version}</version>
364365
</plugin>
366+
<plugin>
367+
<groupId>org.codehaus.mojo</groupId>
368+
<artifactId>flatten-maven-plugin</artifactId>
369+
<version>${maven-plugin-flatten-version}</version>
370+
</plugin>
365371
<plugin>
366372
<groupId>org.apache.maven.plugins</groupId>
367373
<artifactId>maven-jar-plugin</artifactId>
@@ -470,6 +476,35 @@
470476
</execution>
471477
</executions>
472478
</plugin>
479+
<plugin>
480+
<!--
481+
This plugin strips down original pom.xml to a required minimum and stores it within the final artifact in favor of the original one.
482+
Original pom.xml will be kept untouched. For convenience you'll find the flattened version after a Maven build next to the original pom.xml.
483+
This results in a more streamlined POM which is much easier to grasp as a consuming developer of the SDK.
484+
-->
485+
<groupId>org.codehaus.mojo</groupId>
486+
<artifactId>flatten-maven-plugin</artifactId>
487+
<configuration>
488+
<!-- see https://central.sonatype.org/publish/requirements -->
489+
<flattenMode>ossrh</flattenMode>
490+
</configuration>
491+
<executions>
492+
<execution>
493+
<id>flatten</id>
494+
<phase>process-resources</phase>
495+
<goals>
496+
<goal>flatten</goal>
497+
</goals>
498+
</execution>
499+
<execution>
500+
<id>clean-flatten</id>
501+
<phase>clean</phase>
502+
<goals>
503+
<goal>clean</goal>
504+
</goals>
505+
</execution>
506+
</executions>
507+
</plugin>
473508
<plugin>
474509
<groupId>org.apache.maven.plugins</groupId>
475510
<artifactId>maven-source-plugin</artifactId>

0 commit comments

Comments
 (0)