By default, both the repackage and the run goals will include any provided dependencies that are defined in the project. A boot-based project should consider provided dependencies as container dependencies that are required to run the application.

Some of these dependencies may not be required at all and should be excluded from the executable jar. For consistency, they should not be present either when running the application.

There are three ways one can exclude a dependency from being packaged/used at runtime

Exclude a specific artifact identified by groupId and artifactId (optionally with a classifier if needed)