Repository navigation
Use the analyzer 1.18 API in analyze mojos - #1815
Draft
slachiewicz wants to merge 2 commits into
Draft
slachiewicz wants to merge 2 commits into
slachiewicz wants to merge 2 commits into
Conversation
slachiewicz
force-pushed
the
agent/analyzer-api-migration
branch
from
November 21, 2026 20:12
e7daf9a to
cc0cde0
Compare
Bump the analyzer to 1.18.0. Replace duplicated group-and-artifact key logic with ArtifactKeys.groupArtifactId and render ambiguous used classes with the candidate and selected artifact data exposed by ProjectDependencyAnalysis.
From analyzer 1.18.0 on, forceDeclaredDependenciesUsage keeps the usages of the dependencies already detected as used, so the usages are read after the force. Restore the read-before-force order if the analyzer is ever moved back below 1.18.0. The analyzer is pinned to 1.18.0-SNAPSHOT until 1.18.0 is released.
slachiewicz
force-pushed
the
agent/analyzer-api-migration
branch
from
November 22, 2026 00:02
cc0cde0 to
82d25c1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Moves the analyze goals to the API of
maven-dependency-analyzer1.18.0 and shows the class-level data it adds.verbose,analyzeandanalyze-onlylist the used classes that more than one dependency contains, with the dependency the analysis selected, and the used classes that no dependency contains. Both are info lines and do not count as warnings forfailOnWarning.analyze-reportgets an Ambiguous Used Classes section (class, candidate artifacts, selected artifact) and a Used Classes Not Found in Any Dependency section.usedDependenciesis applied; 1.18.0 keeps them when usage is forced (Keep the usages of used declared dependencies when forcing usage maven-dependency-analyzer#345).ForcedUsageandAnalyzeDepMgtuseArtifactKeys.groupArtifactIdin place of their own key logic.The analyzer is pinned to
1.18.0-SNAPSHOT. This PR stays in draft until 1.18.0 is released and the pin is changed to it.Verified:
mvn -Prun-its verifyon JDK 17 against analyzer master → 764 tests, 122/122 ITs. No IT has an ambiguous or unmapped class, so the new output is covered by unit tests only.