Skip to content

Conversation

@Celebrate-future
Copy link

@Celebrate-future Celebrate-future commented Apr 18, 2022

Hi! I found the pom file of project org.ninjaframework:ninja-core:6.9.1-SNAPSHOT introduced 74 dependencies. However, among them, 8 libraries (11%) are not used by your project. I list the redundant dependencies below (labelled as red ones in the figure):

Redundant dependencies

com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
com.google.j2objc:j2objc-annotations:jar:1.3:compile
jakarta.activation:jakarta.activation-api:jar:1.2.1:compile
com.google.errorprone:error_prone_annotations:jar:2.3.4:compile
org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile
jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.2:compile
org.jboss.logging:jboss-logging-annotations:jar:1.2.0.Beta1:compile
org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.0.Final:compile

Outdated dependencies

jakarta.activation:jakarta.activation-api:1.2.1 (1712 days without maintenance)
org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.0.0.Final (3581 days without maintenance)
com.google.j2objc:j2objc-annotations:1.3 (2383 days without maintenance)
jakarta.xml.bind:jakarta.xml.bind-api:2.3.2 (1676 days without maintenance)


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 org.jboss.logging:jboss-logging-annotations:jar:1.2.0.Beta1:compile induced dependency conflict in the dependency graph. As such, I suggest a refactoring operation for org.ninjaframework:ninja-core:6.9.1-SNAPSHOT’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 org.ninjaframework:ninja-core:6.9.1-SNAPSHOT’s maven tests.

Best regards

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.

1 participant