Repository navigation
Use the analyzer 1.18 API in analyze mojos - #1815
Draft
slachiewicz wants to merge 1 commit into
Draft
slachiewicz wants to merge 1 commit into
slachiewicz wants to merge 1 commit into
Conversation
Bump the analyzer to the 1.17.3-SNAPSHOT build that carries the 1.18.0 API. 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.
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.
Summary
Migrates
maven-dependency-pluginto the analyzer API added for 1.18.0 in the1.17.3-SNAPSHOTbuild:maven-dependency-analyzerfrom 1.17.2 to 1.17.3-SNAPSHOT.groupId:artifactIdkey logic inForcedUsageandAnalyzeDepMgtwithArtifactKeys.groupArtifactId.analyze-reportusinggetAmbiguousUsedDependencyClasses(),getCandidateArtifactsByUsedClass(), andgetSelectedArtifactByUsedClass(). The table lists each class, the artifacts that provide it, and the artifact the analyzer selected.The low-level
ClassEntrySourceandPathoverloads don't apply here. The plugin consumes the high-levelProjectDependencyAnalyzerSPI, so no analyzer signature changes are needed. The class-level data comes from apache/maven-dependency-analyzer#320.Verification
mvn -B -o -Dtest=AnalyzeReportRendererTest test: 2 tests pass.mvn -B -o -Prun-its verifyon JDK 21 with the snapshot installed locally: 756 unit tests and 122 ITs pass, with no failures or errors.mvn spotless:applyandmvn -N spotless:checkpass on JDK 17.Merge blocker
This PR stays in draft until the analyzer release is published. GitHub Actions can't resolve
1.17.3-SNAPSHOTbecause the plugin doesn't declare an Apache snapshots repository. Before marking this PR ready, publish the analyzer release and change the dependency to the released version.