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

banDuplicateClasses incorrectly finds duplicates #302

Open
wilx opened this issue Jun 28, 2024 · 0 comments · May be fixed by #303
Open

banDuplicateClasses incorrectly finds duplicates #302

wilx opened this issue Jun 28, 2024 · 0 comments · May be fixed by #303

Comments

@wilx
Copy link
Contributor

wilx commented Jun 28, 2024

Here is a test project that demonstrates the issue: https://github.com/wilx/dup-classes-test/tree/master/ This project consists of a lib artifact which simulates jakarta.servlet-api being included in some 3rd party transitive library in compile scope. Then there is a dup-classes-test project, which utilizes lib and also declares jakarta.servlet-api in provided scope which should win and all references of the jakarta.servlet-api should be referencing this one in the provided scope. The dependency:tree agrees with this:

The problem seems to be that it does not correctly filter out jakarta.servlet-api artifact in the compile scope in the transitive dependency.

wilx added a commit to wilx/extra-enforcer-rules that referenced this issue Jun 28, 2024
Use repositorySystem.resolveDependencies() to fold collection and resolution steps
into one.

Use filters for resolveDependencies() call. Do not pre-filter dependencies.

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

Successfully merging a pull request may close this issue.

1 participant