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

Trying to exclude dependencies from a repackaged JAR using [<excludes>] still includes transitive dependencies. #22981

Closed
chanseokoh opened this issue Aug 17, 2020 · 1 comment
Labels
status: duplicate A duplicate of another issue

Comments

@chanseokoh
Copy link

chanseokoh commented Aug 17, 2020

Excluding dependencies from a repackaged JAR using <excludes> should exclude transitive dependencies as well.

For more context, this is from the hidden comment (#13289 (comment)) marked as off-topic in #13289:

The following hidden comments (#13289 (comment), #13289 (comment)) marked as off-topic seems to be very informative and vital for those who would like to exclude provided-scoped dependencies as a workaround.

@brianwhu exclude works for single dependency only; any transitive still packaged

Bad news: <excludes> excludes only a specific artifact, but includes all its transitive dependencies!

I do not understand why someone has hidden such helpful information as off-topic, but I hope this comment does not get hidden as well. If I were the repo maintainer, I would not hide them.

For example, in #13289, the issue talks about the Spring Boot plugin behavior that includes provided-scoped dependencies in the repackaged JAR (not that this is a problem). As a workaround, one can use <excludes> to exclude these dependencies, for example. However, it is counter-intuitive that it still packages all the transitive dependencies.

@snicoll
Copy link
Member

snicoll commented Aug 17, 2020

Thanks for the report but this is the documented behaviour for now and there is already an issue to revisit the situation.

Duplicate of #16563

@snicoll snicoll closed this as completed Aug 17, 2020
@snicoll snicoll added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants