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.kumuluz.ee.samples.blog:orders-persistence:1.0.0-SNAPSHOT drop off redundant dependencies? #58

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.kumuluz.ee.samples.blog:orders-persistence:1.0.0-SNAPSHOT introduced 18 dependencies. However, among them, 12 libraries (66%) are not used by your project. I list the redundant dependencies below (labelled as red ones in the figure):

Redundant dependencies

org.eclipse.persistence:org.eclipse.persistence.antlr:jar:2.6.5:compile
javax.annotation:javax.annotation-api:jar:1.3.2:compile
com.kumuluz.ee.rest:kumuluzee-rest-core:jar:1.1.0:compile
javax.servlet:javax.servlet-api:jar:3.1.0:compile
org.eclipse.persistence:org.eclipse.persistence.asm:jar:2.6.5:compile
org.postgresql:postgresql:jar:42.1.4:compile
com.kumuluz.ee:kumuluzee-common:jar:2.6.0:compile
org.slf4j:slf4j-api:jar:1.7.25:compile
com.zaxxer:HikariCP:jar:2.6.3:compile
javax.transaction:javax.transaction-api:jar:1.2:compile
org.yaml:snakeyaml:jar:1.18:compile
org.eclipse.persistence:org.eclipse.persistence.jpa.jpql:jar:2.6.5: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 org.postgresql:postgresql:jar:42.1.4:compile incorporates a high-level vulnerability SNYK-JAVA-ORGPOSTGRESQL-571481. As such, I suggest a refactoring operation for com.kumuluz.ee.samples.blog:orders-persistence:1.0.0-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 com.kumuluz.ee.samples.blog:orders-persistence:1.0.0-SNAPSHOT’s maven tests.

Best regards
image

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