I had 3 maven projects A,B,C. A is dependent on B which in-turn depends on C. A's POM has dependency for B and B's POM has dependency for C. I want to exclude a class file in C when building A.
How can I do this ? I tried doing this using excludes of maven-jar-plugin, but not able to succeed.
Use maven-jar-plugin
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<executions>
<execution>
<id>default-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<excludes>
<exclude><!-- package you want to exclude --></exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With