Я пытаюсь отфильтровать ресурсы, включенные в мою банку. Я использую shade-maven-plugin, и это добавляет все ресурсы всех моих зависимостей в мою созданную банку, я хочу только включить мои ресурсы проекта.Фильтровать ресурсы maven-shade-plugin
Вот мое определение П:
<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>
Я пытался добавить следующий фильтр, чтобы удалить все ресурсы, а затем добавить еще один фильтр, добавив только мои артефакта ресурсы, но она не работает.
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>resources/*.*</exclude>
</excludes>
</filter> <filter>
<artifact>my.groupId:my.artifactId</artifact>
<includes>
<include>resources/*.*</include>
</includes>
</filter>
Идеи?
Спасибо.
выглядит честно, разве ваш фильтр не хранит ваши ресурсы? – Genjuro