I have a problem when I run junit through ant. Essentially, I'm getting
a ClassNotFound exception for the the java compiler (yes, I'm compiling
code). When I run this in JBuilder, it works great.
What I've done in ant is create path, "project.class.path" like this.
<path id="project.class.path">
<pathelement location="classes"/>
.
.
.
<pathelement location="${java.home}/lib/tools.jar" />
</path>
(and yes, java.home is defined correctly).
Then in my test target, I have this...
<target name="test" depends="compile">
<junit printsummary="off" dir="${src}" fork="on"
haltonfailure="on">
<classpath>
<path refid="project.class.path"/>
<pathelement location="/tmp/classes" />
</classpath>
<formatter usefile="no" type="plain"/>
<test name="UnitTestSuite"/>
</junit>
</target>
I've tried running with -debug and -verbose. I can see the java
invocation for the test target, and sure enought, tools.jar is not in
it. However, there is nowhere I can see where the path
"project.class.path" is actually created correctly.
Ideas?
--
David Corbin
[EMAIL PROTECTED]