以下部分显示了我的pom.xml中的shade插件的配置:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>META-INF/ECLIPSE*</exclude>
</excludes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
然而,一些(似乎??)排除的文件潜入输出jar文件:
02:19:43/xt $jar -tvf target/ignitedemo-1.0-SNAPSHOT.jar | grep META | egrep "RSA|DSA|SF"
9958 Sun Jul 05 02:19:26 PDT 2015 META-INF/ECLIPSEF.SF
5639 Sun Jul 05 02:19:26 PDT 2015 META-INF/ECLIPSEF.RSA
那么在阴影插件配置中有什么不正确的呢?
答案 0 :(得分:1)
答案 1 :(得分:1)
使用artifactSet
指定应排除哪些工件。您必须使用filters
,请参阅http://maven.apache.org/plugins/maven-shade-plugin/examples/includes-excludes.html
(ps。你如何进入你的pom配置?)