I’d like to know if I can exclude a JAR file (i.e. the corresponding package / class hierarchy) from a jar-with-dependencies assembly ?
I know that this can be done by creating a custom assembly descriptor, but can this be done directly within the POM uwint the pre-defined descriptorRefs ?
So far I’ve test approaches such as:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<dependencySets>
<dependencySet>
<excludes>
<exclude>com.somepackage:*</exclude>
</excludes>
</dependencySet>
</dependencySets>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>${project.artifactId}-${project.version}</finalName>
<classifier>full-build</classifier>
</configuration>
<executions>
<execution>
<id>jar-with-depts</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
But without success…
Thanks in advance!
As far as I know, it is not possible. The above configuration does not work, since
<dependencySet>is not part of mvn assembly:single configuration.<classifier>is deprecated as well.