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

Could com.mastfrog:netty-http-test-harness:2.8.1 drop off redundant dependencies? #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Celebrate-future
Copy link

Hi! I found the pom file of project com.mastfrog:netty-http-test-harness:2.8.1 introduced 47 dependencies. However, among them, 6 libraries (12%) are not used by your project. I list the redundant dependencies below (labelled as red ones in the figure):

Redundant dependencies

com.mastfrog:giulius-annotations:jar:2.8.0:compile
com.google.code.findbugs:jsr305:jar:3.0.2:compile
com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
com.google.j2objc:j2objc-annotations:jar:1.3:compile
javax.inject:javax.inject:jar:1:compile
com.google.errorprone:error_prone_annotations:jar:2.5.1:compile


Removing the redundant dependencies can reduce the size of project and prevent potential dependency conflict issues (i.e., multiple versions of the same library). More importantly, one of the redundant dependencies javax.inject:javax.inject:jar:1:compile induced dependency conflict in the dependency graph. As such, I suggest a refactoring operation for com.mastfrog:netty-http-test-harness:2.8.1’s pom file.

The attached PR helps resolve the reported problem. It is safe to remove the unused libraries (we considered Java reflection relations when analyzing the dependencies). These changes have passed com.mastfrog:netty-http-test-harness:2.8.1’s maven tests.

Best regards

@timboudreau
Copy link
Owner

Was this auto generated or something?

What you are saying are unused dependencies are mostly annotation classes that are used at compile time, just not necessarily at runtime.

Maybe try actually building the project with such dependencies?

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 this pull request may close these issues.

2 participants