|
|
|
Above Ant build file fragment should be changed to
<copy todir="${test.classes}">
<fileset dir="${test.resources}">
<include name="log4j.xml"/>
</fileset>
</copy>
and a new Ant property named 'test.classes' should be defined. In addition, I just verified that log4j.xml files won't be included in production binaries anymore.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<copy todir="${classes}"> <fileset dir="${test.resources}"> <include name="log4j.xml"/> </fileset> </copy>which apparently copy test resources into the (main) build class path, and that is wrong. Test resources should not end up in release JARs, and used for testing only.
I suggest to mimic Maven's behavior of creating additional build/test-classes directories, and copy test classes as well as test-resources to this new place. This location can subsequently be referenced from scripts that e.g. start a CTF test suite.
Personal comment: it's about time to drop Ant, as we are coding something in Ant build files that has been solved elsewhere already.