pedrorijo91
pedrorijo91

Reputation: 7845

Difference between ArtifactSet and Filters

I'm trying to exclude some classes that come from a dependency in a fat jar and includes things like slf4j (that cause dependency conflicts).

I've looked at the maven-shade-plugin (https://maven.apache.org/plugins/maven-shade-plugin/). I first tried to use the artifactSet param, but it didn't work by using jar tf myjar.jar. The dependencies I was trying to exclude were still there.

I was able to solve it using the filters param as described in the docs: http://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html

It is not obvious to me the difference between these two. Can someone enlighten me please?

Upvotes: 2

Views: 411

Answers (1)

Steve Mitchell
Steve Mitchell

Reputation: 2070

According to the documentation, <artifactSet> includes or excludes whole jars, while <filters> includes or excludes classes within a jar.

Upvotes: 1

Related Questions