Open harrisric opened 6 months ago
The problem appears to originate here: https://github.com/mojohaus/flatten-maven-plugin/blob/master/src/main/java/org/codehaus/mojo/flatten/FlattenMojo.java#L1097 This appears to try and resolve the excluded dependency, which leads to the problem in finding its parent.
In the 1.3.0 the dependency in the exclusion block is never resolved.
In using
flatten:flatten
I have found a change in behaviour between 1.3.0 and 1.6.0. Specifically I think that the change is in 1.4.0 as this is the first version at which it fails. When usingflattenDependencyMode=all
the plugin seems to try and resolve dependencies parents and now fail if they cannot be fully resolved.This is reproduced in the simple example project pom attached by calling
mvn flatten:flatten
pom.xml.txtThe problem as I understand it is that we have a dependency chain:
com.querydsl:querydsl-core:4.3.1
->com.infradna.tool:bridge-method-annotation:jar:1.13
-> exclusion:org.jenkins-ci:annotation-indexer:jar:1.4
but that
org.jenkins-ci:annotation-indexer:jar:1.4
references an unpublished parent projectorg.jenkins-ci:jenkins:pom:1.26
which therefore cannot be resolved.If there is a way to avoid this parent resolution or suppress the failure then that would be helpful as the behaviour at 1.3.0 of
flatten-maven-plugin
seemed to be sufficient in this use-case.