java - Exclude Classes from Being Included in Shaded Jar -


i'm trying exclude classes being included in shaded jar.

i have tried several different configurations reason jars still being included in jar. here plugin setup:

<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> 

i have tried following patterns:

<exclude>java.*</exclude> <exclude>java.util.concurrent.concurrenthashmap</exclude> <exclude>java/util/concurrent/concurrenthashmap</exclude> 

none of have excluded file jar. how can exclude class jar?

you excluding top level files in java folder. can exclude recursively this:

<exclude>java/**/*</exclude> 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -