Filter resources maven-shade-plugin -
i trying filter resources included in jar. i'm using shade-maven-plugin , 1 adding resources of dependencies generated jar, want included project resources.
here pom definition:
<plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-shade-plugin</artifactid> <version>1.6</version> <executions> <execution> <goals> <goal>shade</goal> </goals> <configuration> <minimizejar>true</minimizejar> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.manifestresourcetransformer"> <mainclass>es.app.applet.myapplet</mainclass> </transformer> </transformers> </configuration> </execution> </executions> <configuration> <filters> <filter> <artifact>*:*</artifact> <excludes> <exclude>meta-inf/*.sf</exclude> <exclude>meta-inf/*.dsa</exclude> <exclude>meta-inf/*.rsa</exclude> <exclude>meta-inf/*.rsa</exclude> </excludes> </filter> </filters> </configuration> </plugin>
i tried add next filter remove resources, , add filter adding artifactid resources, doesn't work.
<filter> <artifact>*:*</artifact> <excludes> <exclude>resources/*.*</exclude> </excludes> </filter> <filter> <artifact>my.groupid:my.artifactid</artifact> <includes> <include>resources/*.*</include> </includes> </filter>
ideas?
thanks.
this because filter includes happen before filter excludes.
with code including "my.groupid:my.artifactid" -> resources/.
but aterwards excluding "resources/."
from original documentation :
from logical perspective, includes processed before excludes, it's possible use include collect set of files archive use excludes further reduce set.
Comments
Post a Comment