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 eu.chargetime.ocpp:common:1.0.1 drop off redundant dependencies? #186

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 eu.chargetime.ocpp:common:1.0.1 introduced 13 dependencies. However, among them, 4 libraries (30%) are not used by your project. I list the redundant dependencies below (labelled as red ones in the figure):

Redundant dependencies

javax.activation:activation:jar:1.1:compile
javax.xml.soap:javax.xml.soap-api:jar:1.4.0:compile
javax.xml.bind:jaxb-api:jar:2.1:compile
javax.xml.stream:stax-api:jar:1.0-2: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.activation:activation:jar:1.1:compile incorporates an incompatible license COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) V1.0 (COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) V1.0 cannot be used by the project with license MIT License), one of the redundant dependencies javax.xml.stream:stax-api:jar:1.0-2:compile incorporates an incompatible license COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) VERSION 1.0 (COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) VERSION 1.0 cannot be used by the project with license MIT License). As such, I suggest a refactoring operation for eu.chargetime.ocpp:common:1.0.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 eu.chargetime.ocpp:common:1.0.1’s maven tests.

Best regards

@TVolden
Copy link
Member

TVolden commented Apr 27, 2022

Hi @Celebrate-future,

Thank you for the contribution and sorry for my slow response time.

I can see that the Java CI Maven job failed (I had to start it manually for some reason).
It looks like the soap and bind dependencies causes some problems for the compiler.

I like that you want to clean up dependencies, I just don't have much time to assist you at the moment. Can I get you to investigate the failing classes and see if they could be resolved. Any help is deeply appreciated.

Sincerely,
Thomas Volden

@Celebrate-future
Copy link
Author

Hi @Celebrate-future,

Thank you for the contribution and sorry for my slow response time.

I can see that the Java CI Maven job failed (I had to start it manually for some reason). It looks like the soap and bind dependencies causes some problems for the compiler.

I like that you want to clean up dependencies, I just don't have much time to assist you at the moment. Can I get you to investigate the failing classes and see if they could be resolved. Any help is deeply appreciated.

Sincerely, Thomas Volden

These changes have passed maven tests but I don't know why Java Ci failed

@jmluy
Copy link
Contributor

jmluy commented Jul 8, 2022

@Celebrate-future Java 11 dropped support for the required libraries which were provided by those other dependencies. Based on https://stackoverflow.com/a/54574003, you can just replace the libraries?

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.

3 participants