Closed hohwille closed 3 years ago
I just looked at the installed parent POM of the project ($M2_REPO/com/demo/example/1.0.0-SNAPSHOT/example-1.0.0-SNAPSHOT.pom
) and it contains:
<version>${revision}</version>
Even worse also the POM of the API module was not flattened either ($M2_REPO/com/demo/example-api/1.0.0-SNAPSHOT/example-api-1.0.0-SNAPSHOT.pom
):
<version>${revision}</version>
So it has not been flattened and that is definetly a bug.
The flatten-maven-plugin is only added to dependencyManagement
in our application template (archetype):
https://github.com/devonfw/devon4j/blob/fbbdb7326cc016b12fb5b8eb63f40a5b5de7b0af/templates/server/src/main/resources/archetype-resources/pom.xml#L276
However, it is never added to the build and therefore does not resolve variables such as ${revision}
.
Therefore the build is entirely broken. We have to fix this quickly as this will also break projects, trainings or tutorials done on the latest archetype.
@suvmanda thanks for figuring out this bug. This is an excellent finding that we should have already found with issue #85 and PR #382. Anyhow great that we now are aware and can fix it before any harm has happened.
With issue #85 we introduced ci-friendly-maven also for our archetype. Now, @suvmanda has found out a new bug with this approach that can be reproduced by the following steps:
The first build is successful:
However, the second one failes with: