[MPMD-384] maven-pmd-plugin is downloading transitive dependencies of… #135
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The app pom introduces A:1.0-RELEASE, and this artifact A has transitive dependency B:0.12.0-SNAPSHOT. In app pom, we manage B as version 0.13.0-RELEASE.
When the pmd:3.15.0 and above is being executed, it will resolve dependencies, and somehow the B:0.12.0-SNAPSHOT is resolved as a dependency instead of B:0.13.0-RELEASE.
This is not only downloading wrong version, but also means lots of transitive dependencies with unmanaged version will be always downloaded (if not in cache) causing build slowness. Especially when we are using BF option: -Daether.dependencyCollector.impl=bf, this algorithm will skip downloading poms of for conflict losers, but maven-pmd-plugin (having this bug) again downloads those skipped ones.
More details about BF:
https://issues.apache.org/jira/browse/MRESOLVER-324