Hi,
I would like to define a profile to exclude certain packages and classes
from the jar builded -
we have an internal common package containing shared functionality, but for
a specific project for a specifc client I have to exclude certain classes
and packages
(because of security and licencing problems...)
I added something like this to my pom:
<profile>
<id>myflag</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<excludes>
<exclude>**/com/mycompany/mysubpackage/packageA/packageB/*</exclude>
<exclude>**/com/mycompany/mysubpackage/packageC/MyClass.java</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
and called it like that:mvn package -P myflag
However, it didn't work! :-(
Any ideas, what wrong?
Thanks in advance,
Peter