You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by su...@wipro.com on 2010/03/16 09:55:39 UTC

RE: Maven : Problem in including/excluding some java war files in a war file.

Best practice is one output per module. Is it not possible to make
multiple war outputs as different projects.

Subir 

-----Original Message-----
From: Sudheer Gollapudi [mailto:sudheer.gollapudi@gmail.com] 
Sent: Tuesday, March 16, 2010 12:09 AM
To: users@maven.apache.org
Subject: Maven : Problem in including/excluding some java war files in a
war file.

Hello

Iam working on a project where i have to convert the existing ANT based
project to a maven project.In this process iam trying to make multiple
war files out of a single source base.Iam using the maven build tag to
do this and here is a sample code that iam using in my pom.xml

<build>
               <plugins>
                       <plugin>
                               <groupId>org.apache.maven.
plugins</groupId>
                               <artifactId>maven-war-plugin</artifactId>
                               <executions>
                                       <execution>
                                               <id>tdeinbound</id>
                                               <phase>package</phase>
                                               <goals>
                                                       <goal>war</goal>
                                               </goals>
                                               <configuration>

 <classifier>tdeinbound</classifier>


 <includes>

   <include>**/com/atx/tde/in/*.class</include>

   <include>**/com/atx/tde/in/util/*.class</include>

   <include>**/com/atx/tde/common/*.class</include>

   <include>**/com/atx/tde/common/xml/*.class</include>

   <include>**/com/atx/tde/common/xml/agreementwaiver/*.class</include>

 
<include>**/com/atx/tde/common/xml/processtelematics/*.class</include>

   <include>**/com/atx/tde/common/xml/subsrenewal/*.class</include>

   <include>**/com/atx/tde/common/xml/svctermination/*.class</include>

   <include>**/com/atx/tde/common/xml/syncparty/*.class</include>

   <include>**/com/atx/tde/common/exception/*.class</include>

   <include>**/com/atx/tde/common/dataobjects/*.class</include>

   <include>**/com/atx/tde/common/constants/*.class</include>

 
<include>**/com/atx/tde/out/mq/TDEMQListenerProperties.class</include>

   <include>**/com/atx/tde/out/mq/dataobjects/*.class</include>

   <include>**/com/atx/tde/out/util/*.class</include>

   <include>**/com/atx/tde/out/TDEOutboundServiceManager.class</include>

 </includes>

 <excludes>

   <exclude>com/atx/tde/in/siebelInterface/*.class</exclude>

 </excludes>


 <useDefaultManifestFile>true</useDefaultManifestFile>
                                               </configuration>
                                       </execution>
                               </executions>
                       </plugin>
               </plugins>
       </build>

Iam trying to include some of my source files using the include tag and
iam trying to exclude some of the java files using the exclude
tags.Though iam running my mvn install,the final war that is getting
built is containing the entire source and its not including a sub set of
classes or its not exlucding some set of classes.I have tried the
following options

1.Trying with only include tag in the build sevtion.
2.Trying with only exclude tag in the build section.
3.Trying to include the include tag and the exclude tag under a
"<webResources> <resource>" tag but this gives a null pointer exception
when running the mvn instal target.

Please guide me through this

Thanks for all your comments

Sudheer

Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 

www.wipro.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org