Open jtnord opened 4 years ago
checked with 1.1.0
and 1.2.0-SNAPSHOT
as of 04d44a8ef9cf3743741377247ccec0e31133ad29
actually to be honest flatten-maven-plugin
was never intended to be used for projects with externally published parent POMs. The idea is instead that parent POMs are just used for development and project build is tiggered via reactor.
That does not mean that we can not extend this plugin to address your needs. However, do not expect too much. I am already hopeless out of time maintaining the plugin by reviewing fully featured PRs. So your chances are much better, if you also provide a fix for the "bug".
@hohwille I did have a quick look at the time but like you I'm lacking spare time. The PR was that should someone have some free time they at least have something they can test against and possibly use to help them get to the root cause. I also came to the realisation that declaring dependency versions in a profile is a bad thing™
In the case where a parent (outside a reactor) declares dependencies whose versions are defined in one of two profiles (either explicit in depMgmt or via a bom import) then project that uses that parent will fail to build due to missing dependencies. If you remove the flatten-maven-plugin then the project does build successfully and does resolve the dependencies/versions correctly.
Can be demonstrated with https://github.com/jenkinsci/plugin-pom/commit/c228e26952e726995f35c2a80cb409269bdfa4ef