From 2d79b59b5bc6667b460e091d22f9162552797c05 Mon Sep 17 00:00:00 2001 From: Roi Menashe <33356310+roimenashe@users.noreply.github.com> Date: Sat, 21 Aug 2021 15:14:51 +0300 Subject: [PATCH] Add flatten-maven-plugin (fixes: issue #69) (#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. --- pom.xml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pom.xml b/pom.xml index c8518c5..a25c059 100644 --- a/pom.xml +++ b/pom.xml @@ -199,6 +199,31 @@ + + org.codehaus.mojo + flatten-maven-plugin + 1.2.7 + + true + bom + + + + flatten + process-resources + + flatten + + + + flatten.clean + clean + + clean + + + + \ No newline at end of file