Thanks a lot Simon. I have voted for the issue.

Abhijit
-----Original Message-----
From: Simon Kitching [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 28, 2006 3:18 AM
To: Maven Users List
Subject: RE: How to deselect classes while creating jar?

No, unfortunately the maven-jar-plugin for maven 2.x does not support
includes/excludes at the current time:
  http://jira.codehaus.org/browse/MJAR-30

You can of course control what goes into the jar by using
includes/excludes at the *compile* stage, if that's appropriate for your
project. If not, you might want to vote for that issue...

Regards,

Simon

On Thu, 2006-07-27 at 09:45 -0500, Chris Hilton wrote:
> 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]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to