Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression in full flattening with some dependencies #408

Open
harrisric opened this issue Mar 12, 2024 · 1 comment
Open

Regression in full flattening with some dependencies #408

harrisric opened this issue Mar 12, 2024 · 1 comment
Labels

Comments

@harrisric
Copy link

harrisric commented Mar 12, 2024

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 using flattenDependencyMode=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.txt

The 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 project org.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.

@harrisric
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants