-
Notifications
You must be signed in to change notification settings - Fork 80
Description
Is your feature request related to a problem? Please describe.
Maven has a limited list of dependency scopes and it's not possible to create custom ones. As such, dependencies that are development only can end up on the classpath. This has caused issues in the past for things that need to build an executable based on a Maven project.
Spring Boot has had several issues such as spring-projects/spring-boot#13289 and implemented several features to allow dependencies to be excluded:
- Exclude by GAV
- Explicit flag for well-known dependencies
- Add support for an attribute in the MANIFEST that would remove the jar
The Maven plugin for native build tools urrently works in two modes: it builds the classpath itself, or it lets you define it. It would be nice if we could configure it to be able to exclude certain dependencies that shouldn't be analyzed by native-image in the first place.
Describe the solution you'd like
A way to exclude a dependency. Either by providing the GAV in the plugin configuration or via a manifest entry. The latter looks less invasive and would work out of the box.
Describe alternatives you've considered
None as building the classpath ourselves isn't really practical with Maven. The plugin is configured in our maven parent and used in a wide range of contexts.