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

Remove redundant dependencies #141

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

Conversation

Celebrate-future
Copy link

@tmortagne Hi, I am a user of project org.xwiki.commons:xwiki-commons-tool-remote-resource-plugin:13.3-SNAPSHOT. I found that its pom file introduced 55 dependencies. However, among them, 11 libraries (20%) have not been used by your project (the redundant dependencies are listed below). Reduce these useless dependencies can help prevent conflicts between library versions. MeanWhile, it can minimize the total added size to projects. It can also help enable advanced scenarios for users of your package.
This PR helps org.xwiki.commons:xwiki-commons-tool-remote-resource-plugin:13.3-SNAPSHOT lose weight :) I have tested the revised configuration in my local environment. It is safe to remove the unused libraries.

Best regards

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.inject:javax.inject:jar:1:compile
org.apache.maven:maven-archiver:jar:3.5.0:compile
org.codehaus.plexus:plexus-archiver:jar:4.2.4:compile
org.codehaus.plexus:plexus-io:jar:3.2.0:compile
org.apache.commons:commons-compress:jar:1.20:compile
org.iq80.snappy:snappy:jar:0.4:compile
org.tukaani:xz:jar:1.8:runtime
org.codehaus.plexus:plexus-resources:jar:1.0.1:compile

@tmortagne
Copy link
Member

I'm generally not a fan of this kind of optimization. Even if the excluded dependencies are not used they don't really cause any trouble right now while we are not really sure of what will happen in some edge cases if we do exclude it and it could cause unnoticed regressions when upgrading maven-remote-resources-plugin and it start actually using one of those dependencies.

In any case I cannot really validate if this pull request is accurate since I don't know maven-remote-resources-plugin well enough. We just extend this plugin to workaround a memory problem in ProcessRemoteResourcesMojo (see https://issues.apache.org/jira/browse/MRRESOURCES-106).

@vmassol
Copy link
Member

vmassol commented Apr 6, 2021

Yes I also don't like it too much. Using an exclusion is usually a hack, and kind of suggests that there's a problem in the upstream code that it's missing some "optional" deps.

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