1
我試圖排除某些類被包含在陰影罐中。從陰影罐中排除類
我已經嘗試了幾種不同的配置,但由於某些原因,罐子仍然包含在我的罐子裏。這裏是插件設置:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>java/*</exclude>
</excludes>
</filter>
</filters>
</configuration>
</plugin>
我也曾嘗試以下方式:
<exclude>java.*</exclude>
<exclude>java.util.concurrent.ConcurrentHashMap</exclude>
<exclude>java/util/concurrent/ConcurrentHashMap</exclude>
其中沒有實際上已經排除了從我的jar文件。我如何從我的jar中排除這個類?