Skip to content

add configuration for maven-plugin to exclude provided scope dep. #25274

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

Closed
qrqhuang opened this issue Feb 14, 2021 · 2 comments
Closed

add configuration for maven-plugin to exclude provided scope dep. #25274

qrqhuang opened this issue Feb 14, 2021 · 2 comments
Labels
status: duplicate A duplicate of another issue

Comments

@qrqhuang
Copy link

qrqhuang commented Feb 14, 2021

Let's talk about more about the spring-boot-maven-plugin for provided scope in #8005 .

In out project, there many not useful dependency provider by 2rd SDK. and these dep will stuck application startup.
We use provided scope and 999-not-exist version to exclude them totally.
If repackage do not exclude them. We have to exclude manual one by one.
So can configuration for provided exclude be added ?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 14, 2021
@wilkinsona
Copy link
Member

@qrqhuang Plus comment on #8005 rather than opening a duplicate issue. If you do so, please explain why you have dependencies on things that are not useful. If they're not useful to your application, why not exclude them using Maven's standard exclusion mechanism? This will avoid them cluttering up the compile, runtime, and test classpaths in Maven as well as avoiding them appearing in your repackaged jar.

@wilkinsona wilkinsona added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 14, 2021
@qrqhuang
Copy link
Author

qrqhuang commented Feb 14, 2021

Sorry about that.

I've notice that previous issue is closed. There are some author prefer open a new issue rather than to a closed one.

But maven exclusion mechanism it not convenient. In gradle, it has global exclusion strategy, such like all*.exclude module: 'logback-core', but maven hasn't.

So provided method now can be a displacement way and most commonly used。

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