Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
Inclusion and Exclusion Confusion

Inclusion and Exclusion Confusion

2007-07-19       - By Evan J
Reply:     1     2     3  

Hi,

I have the following structure for a project:

com/host/proj/package1/subpackage/{*.java}
com/host/proj/package2/{*.java}
com/host/proj/test/package2/{*.java}

Note: test/package2 indicates that I am writing test cases for classes
in package2 (at least for now). I would like to compile the packages
in two separate targets: base classes and test classes. So in my javac
task I have the following for the base classes target javac:

destdir="build/classes"

<exclude name="com/host/proj/test/**" />
<include name="com/host/proj/package1/**" />
<include name="com/host/proj/package2/**" />

and for the test classes (different target javac):

destdir="build/test"

<include name="com/host/proj/test/**" />
<exclude name="com/host/proj/package1/**" />
<exclude name="com/host/proj/package2/**" />

The base classes are compile fine (only classes in package1 and
package2 are compiled) but the test compilation also includes classes
from package2. That is after compilation I have package2's classes
also included in my `build/test':

build/test/com/host/proj/test/package2/*.java
build/test/com/host/proj/package2/*.java <-- I DO NOT WANT THIS

And my base classes compilation:

build/classes/com/host/proj/package1/subpackage/*.java
build/classes/com/host/proj/package2/*.java

Can somebody shed light on what I am doing wrong?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.