ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Corbin <dcor...@imperitek.com>
Subject class path problem
Date Sat, 07 Apr 2001 11:15:10 GMT
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 		
dcorbin@imperitek.com

Mime
View raw message