I need to create a jar-with-dependencies. I'm using maven assemply plugin 3.1.0.
I want to:
- include dependencies with scope
compile
and that, transitively - exclude dependencies with scope
provided
.
IE, in the following case as shown by mvn dependency:tree
:
[INFO] +- com.jayway.jsonpath:json-path:jar:2.2.0:compile
[INFO] | +- net.minidev:json-smart:jar:2.2.1:compile
[INFO] | | \- net.minidev:accessors-smart:jar:1.1:compile
[INFO] | \- org.slf4j:slf4j-api:jar:1.7.16:provided
I want to include in the final jar json-path
, json-smart
, accessors-smart
but NOT slf4j-api
.
With the default jar-with-dependencies
descriptor, I also have slf4j-api
included in the resulting jar.
1/ Is it the intended behavior? This seem in contradiction with other maven resolution.
2/ what is assembly descriptor that allows to get what I want?
Thanks