I'm trying to make POM.xml generate two jar files. One with all the classes, the other excluding one of the classes.
The file i'm trying to exclude is named 'ExcludeMe1.java.'I'm new but it's not my FIRST rodeo, in the code below I've excluded ExcludeMe1.class. But the size of the jar file remains unchanged, and I believe it to still contain the class of which I am excluding. Here's what I mean...
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<archive>
<manifest>
<mainClass>com.costanzo.mavendemo.MavenDemo1</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
<execution>
<id>make-assembly22</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<excludes>
<exclude>${project.basedir}/target/excludeMe/ExcludeMe1.class</exclude>
</excludes>
<archive>
<manifest>
<mainClass>com.costanzo.mavendemo.MavenDemo1</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
What I expect to be happening is the exclusion of the class file, which size is 1KB. So instead of getting both jar's as size N I expect N, and N-1.
I am still really new to Maven, so hopefully yall can understand. Always ask questions if you need I'll be checking this thing frequently as it is a high priority project.