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 org.apache.camel.kafkaconnector:camel-kafka-connector-catalog-descriptor-maven-plugin:1.1.0-SNAPSHOT drop off redundant dependencies? #1352

Merged
merged 1 commit into from Apr 1, 2022

Conversation

Celebrate-future
Copy link
Contributor

@Celebrate-future Celebrate-future commented Mar 29, 2022

Hi! I found the pom file of project org.apache.camel.kafkaconnector:camel-kafka-connector-catalog-descriptor-maven-plugin:1.1.0-SNAPSHOT introduced 49 dependencies. However, among them, 7 libraries (14%) are not used by your project. I list the redundant dependencies below (labelled as red ones in the figure):

Redundant dependencies

org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4:compile
org.sonatype.plexus:plexus-cipher:jar:1.4:compile
javax.enterprise:cdi-api:jar:1.0:compile
javax.annotation:jsr250-api:jar:1.0:compile
javax.inject:javax.inject:jar:1:compile
org.codehaus.plexus:plexus-component-annotations:jar:2.1.0:compile
org.sonatype.plexus:plexus-build-api:jar:0.0.7:compile

Outdated dependencies

org.sonatype.plexus:plexus-sec-dispatcher:1.4 (4973 days without maintenance)
javax.inject:javax.inject:1 (5036 days without maintenance)
org.sonatype.plexus:plexus-cipher:1.4 (5203 days without maintenance)
javax.enterprise:cdi-api:1.0 (5010 days without maintenance)
org.codehaus.plexus:plexus-component-annotations:2.1.0 (1375 days without maintenance)
javax.annotation:jsr250-api:1.0 (6092 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.codehaus.plexus:plexus-component-annotations:jar:2.1.0:compile induced dependency conflict in the dependency graph. As such, I suggest a refactoring operation for org.apache.camel.kafkaconnector:camel-kafka-connector-catalog-descriptor-maven-plugin:1.1.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 org.apache.camel.kafkaconnector:camel-kafka-connector-catalog-descriptor-maven-plugin:1.1.0-SNAPSHOT’s maven tests.

Best regards
image

@oscerd oscerd merged commit e612f95 into apache:main Apr 1, 2022
@oscerd
Copy link
Contributor

oscerd commented Apr 1, 2022

Thanks

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.

None yet

2 participants