ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Evan J " <maps.this.addr...@gmail.com>
Subject Inclusion and Exclusion Confusion
Date Fri, 20 Jul 2007 03:49:29 GMT
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@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message