I'm far from an expert, but I think you have to put your <exclude> elements in a separate <excludes> element, like:
<includes> <include/> </includes> <excludes> <exclude/> </excludes> > -----Original Message----- > From: Abhijit Diwan [mailto:[EMAIL PROTECTED] > Sent: Thursday, 27 July, 2006 00:28 > To: users@maven.apache.org > Subject: 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 > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]