ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: Problem with JUnit batchtest
Date Fri, 22 Mar 2002 19:58:41 GMT
Yes, Ant's source code is freely available via CVS.  Check the main Jakarta
website for details.

Things may have changed in the latest codebase, so perhaps you could try a
1.5alpha build (either build it yourself or pull down a nightly build).

    Erik


----- Original Message -----
From: "Larason, Timothy" <TLarason@Datek.com>
To: "Ant Users List" <ant-user@jakarta.apache.org>
Sent: Friday, March 22, 2002 2:30 PM
Subject: RE: Problem with JUnit batchtest


Just played around with it some more and it has to do with the "fork"
attribute.

If I set it to "no", everthing works great.  If I set it to "yes", the
$ANT_HOME/lib are not included, only those in the classpath referenced by
"test.classpath".  Here's a quick snippet of the build.xml that breaks it.

<target name="test" depends="build-test" description="Perform the
UNIT/SYSTEM tests.">
<junit printsummary="yes" haltonfailure="yes" haltonerror="yes">
<classpath refid="test.classpath" />
<formatter type="plain" />
<batchtest fork="yes" haltonfailure="yes" haltonerror="yes"
todir="${test.results.path}">
<fileset dir="${test.src.path}">
<include name="**/*.java" />
</fileset>
</batchtest>
</junit>
</target>

Pretty straightforward build file...

-debug shows me that the pertinent junit jars are being implicitly added in
the junit task.  Is it possible they dont make it out through a fork?  Could
the Java13CommandLauncher be using a classpath that doesnt contain the
implicitly added libraries?

Is the source code for the JUnit task available?  If so, I'd love to dig
around in it a little and see if I can find something.

-----Original Message-----
From: Erik Hatcher [mailto:jakarta-ant@ehatchersolutions.com]
Sent: Friday, March 22, 2002 2:02 PM
To: Ant Users List
Subject: Re: Problem with JUnit batchtest


Does running with -debug shed any light on the issue, rather that -v?


----- Original Message -----
From: "Larason, Timothy" <TLarason@Datek.com>
To: "Ant Users List" <ant-user@jakarta.apache.org>
Sent: Friday, March 22, 2002 1:52 PM
Subject: RE: Problem with JUnit batchtest


yes.  Its strange because for the javac task, all of the $ANT_HOME/lib
libraries are included.

-----Original Message-----
From: Erik Hatcher [mailto:jakarta-ant@ehatchersolutions.com]
Sent: Friday, March 22, 2002 1:49 PM
To: Ant Users List
Subject: Re: Problem with JUnit batchtest


Are you running ant.bat to start Ant?


----- Original Message -----
From: "Larason, Timothy" <TLarason@Datek.com>
To: "Ant Users List" <ant-user@jakarta.apache.org>
Sent: Friday, March 22, 2002 1:45 PM
Subject: RE: Problem with JUnit batchtest


I downloaded it from the ant website, and yes it does have the class in the
jar.  The problem is the jar is never being referenced in the execution
classpath.  In fact, none of the $ANT_HOME/lib jars are being referenced.
On linux they are though.


-----Original Message-----
From: Erik Hatcher [mailto:jakarta-ant@ehatchersolutions.com]
Sent: Friday, March 22, 2002 1:39 PM
To: Ant Users List
Subject: Re: Problem with JUnit batchtest


Where did you obtain optional.jar?  Does it actually have the
JUnitTestRunner class in it?

    Erik


----- Original Message -----
From: "Larason, Timothy" <TLarason@Datek.com>
To: <ant-user@jakarta.apache.org>
Sent: Friday, March 22, 2002 1:23 PM
Subject: Problem with JUnit batchtest


I'm having some problems with the optional task JUnit (more specifically
using batchtest within JUnit).  Everything works fine under Linux, but of
course, like everything else, it all blows up under Windows.

I have the optional.jar and the junit.jar in my $ANT_HOME/lib directory.
When I try to run a junit task (using batchtest), everything compiles
correctly, but when it goes to run the tests, it throws an exception:

java.lang.NoClassDefFoundError:
org/apache/tools/ant/taskdefs/optional/jar/junit/JUnitTestRunner

I ran ant with "-v" and see that for the compile, the $ANT_HOME/lib
libraries are all included in the classpath.  For execution (with java.exe)
they aren't.  Both the compile and the execution use the same "classpath
refid".  Anyone have any ideas?

Thanks.
tim

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>




--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>




--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>




--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>




--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message