Hello,
I have a JUnit test that will cause a class to try to load an XML file as
a URL resource. If I run this straight from JUnit with the appropriate
CLASSPATH environment variable set then it works fine. However if I try
to run this within the JUnit task, then the class is unable to find the
XML file.
Currently javac will output the classes to a build output directory, then
copy all .xml and .properties files over to this structure. When the
JUnit task runs, I figured that I would just add the build output
directory to the classpath there.
I have a path refid that I am using for the <classpath> element, and I
have echo'ed it to verify that my build output directory exists
there. It will run the test classes, but somehow never pick up the xml
file. Currently I am not forking the JUnit process.
One twist that I have found is that if I specify the build output file in
the CLASSPATH environment variable before running Ant, then it works like
a charm. However I am trying to get away from my build.xml file having
dependencies on environment variables..
Has anyone run into this problem? Any help would be greatly appreciated.
Thank you
Bryce Penberthy