Repository navigation
Remove unused declared dependencies, suppress false positive for guice - #556
Merged
Merged
Conversation
elharo
marked this pull request as draft
July 19, 2026 16:08
elharo
commented
Jul 19, 2026
| return jarFile; | ||
| } catch (Exception e) { | ||
| // TODO: improve error handling | ||
| } catch (MavenArchiverException e) { |
Contributor
Author
There was a problem hiding this comment.
this change is not from this PR. all PRs should start with main
maven-dependency-plugin:analyze reports 4 unused declared dependencies. Three are genuinely unused and can be removed: - maven-api-xml (provided): no code references; already transitive via maven-api-core - maven-xml (provided): no code references; already transitive via maven-testing - maven-core (test): no code references; already transitive via maven-testing The fourth, guice (test), is a false positive. It is required at test runtime by Eclipse Sisu (used by the maven-testing harness for DI). Test-scope transitive deps at provided scope are excluded per Maven's scope table, so guice must be declared explicitly. Added it to ignoredUnusedDeclaredDependencies to suppress the warning.
slachiewicz
approved these changes
Jul 22, 2026
|
@elharo Please assign appropriate label to PR according to the type of change. |
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
mvn dependency:analyzereports 4 unused declared dependencies. Three are genuinely unused and can be removed. The fourth (guice) is a false positive required by the test harness.Changes
Removed (3):
maven-api-xml:providedβ no code references; already transitive viamaven-api-coremaven-xml:providedβ no code references; already transitive viamaven-testingmaven-core:testβ no code references; already transitive viamaven-testingKept with suppression (1):
guice:testβ false positive. Required at test runtime by Eclipse Sisu (used by maven-testing harness for DI). Test-scope transitive deps at provided scope are excluded per Maven's scope table, so guice must be declared explicitly. Added to<ignoredUnusedDeclaredDependencies>.Verification
:classesclassifier