Skip to content

Commit

Permalink
Add flatten-maven-plugin (fixes: issue aerospike-community#69) (aeros…
Browse files Browse the repository at this point in the history
…pike-community#71)

* Add flatten-maven-plugin.
Solves the issue of "POM files without a version" caused by the usage of ${revision} property in a multi module project with Maven version below 3.5.
Issue described here:
https://blog.soebes.de/blog/2017/04/02/maven-pom-files-without-a-version-in-it/

Related StackOverFlow questions:
1. https://stackoverflow.com/questions/41086512/maven-issue-to-build-one-module-using-revision-property
2. https://stackoverflow.com/questions/52173260/how-to-resolve-parent-pom-dependency-issue-failed-to-read-artifact-descriptor/52173650#52173650

* Use flattenMode "bom" (Bill of materials) instead of individual pomElements which keeps all optional POM elements that are required for OSS Repository-Hosting and additionally dependencyManagement and properties values.
  • Loading branch information
roimenashe authored Aug 21, 2021
1 parent b9a057d commit 2d79b59
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,31 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.2.7</version>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>bom</flattenMode>
</configuration>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 2d79b59

Please sign in to comment.