You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Abhijit Diwan <ad...@tibco.com> on 2006/07/27 07:27:56 UTC
How to deselect classes while creating jar?
Hi all
I have maven 2.0 project which includes all the java
classes for my project. Now I do not want to create single jar from the
classes generated in the target directory. But there is no documentation
on the maven jar plug-in site about how can I exclude the some of the
classes from getting them in to the jar. I am using maven 2.0. Also
there is lot of cyclic dependency in the classes so can not really
separate the projects.
I feel there is no clear documentation about how can I skip
some of the classes from getting in to the jar. I am using following
profile like this and calling mvn jar:jar -PConnectorJar from the
command line.
<profile>
<id>ConnectorJar</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<includes>
<include>com/tibco/ejb/common/*.java</include>
<include>com/tibco/ejb/connector/*.java</include>
<include>com/tibco/ejb/support/*.java</include>
<include>com/tibco/ejb/util/*.java</include>
<include>com/tibco/ejb/adapter/*.java</include>
<include>com/tibco/ejb/jca15/support/*.java</include>
<include>com/tibco/ejb/jca15/util/*.java</include>
<include>com/tibco/ejb/jca15/connector/**/*.java</include>
<!--<exclude>**/*Work*.java</exclude>-->
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<jarName>AeConnector</jarName>
</configuration>
</plugin>
</plugins>
</build>
<activation>
<property>
<name>AeConnectorJar</name>
</property>
</activation>
</profile>
Help on this will be really appreciated.
Thanks a lot
Abhijit