File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Building War file - Including a package and its only one subpackage while excluding all the others. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Building War file - Including a package and its only one subpackage while excluding all the others." Watch "Building War file - Including a package and its only one subpackage while excluding all the others." New topic
Author

Building War file - Including a package and its only one subpackage while excluding all the others.

krithika vittal
Greenhorn

Joined: Jul 14, 2009
Posts: 11
Hi,

According to my project structure i want build a war file by including a package and its subpackage(only one) while exluding all the other subpackages.

For example, consider the below,

com.jf.broker.adapter
com.jf.broker.adapter.tpa
com.jf.broker.adapter.tpb
com.jf.broker.adapter.tpc
com.jf.broker.utils
com.jf.broker.client

I would like to build a war file according to profiles in maven.

Like if i run with a profile tpa the com.jf.broker.utils
com.jf.broker.client,com.jf.broker.adapter package with its classes and the subpackage com.jf.broker.adapter.tpa should be in the war file


I am using profile , maven-compiler-plugin , <excludes> under <configuration> to achieve the above scenario by excluding com.jf.broker.adapter.tpb
and com.jf.broker.adapter.tpc

If i add a new package com.jf.broker.adapter.tpd , this setup wont work.Is there a way to include the com.jf.broker.adapter.tpa subpackage if i run the tpa profile instead of excluding all the other subpackages ?

Many thanks.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

Try this: use <includes> instead and include com.jf.broker.adapter/*.java, com.jf.broker.adapter.tpa/**/*.java, com.jf.broker.utils/**/*.java, com.jf.broker.client/**/*.java.

If this doesn't help, please post your compiler plugin declaration from your POM.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Building War file - Including a package and its only one subpackage while excluding all the others.