ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject RE: Problem with junitreport and ant 1.6.2
Date Sat, 25 Sep 2004 14:56:33 GMT
Is Xalan in the classpath?  Actually, I should restate that.  What JDK are 
you using?  If 1.4+, then you don't need to put Xalan in the classpath 
(unless you want to override the old buggy version that comes with the JDK 
with the latest one from Apache, in which case you'd put it in 
JAVA_HOME/jre/lib/endorsed).  If 1.3.1_xx and less, then you need Xalan.jar 
in your classpath.

BTW, why don't you want junit.jar in ANT_HOME/lib?  You will save yourself 
a ton of trouble if you simply put it there.  Or, better yet, put it in 
user.home/.ant/lib.   That way, when you upgrade Ant, you never need to 
worry about losing jars if you delete the old ANT_HOME directory and the 
jars will be ready to go immediately with the new version of 
Ant.  Seriously, save yourself the trouble and just do this.  Your problems 
will go away.

Jake

At 03:03 AM 9/25/2004 +0530, you wrote:
>Is there anybody who can help me with this??
>I have defined the junitreport task with ant-junit.jar in my classpath,
>Then why do I get
>  java.lang.NoClassDefFoundError:
>org/apache/tools/ant/taskdefs/optional/junit/XalanExecutor
>This class is in ant-junit.jar, I checked... Why is it not getting
>picked up by junitreport?
>
>Please, Is there anybody who can help me with this?
>
>Sadaf
>
>-----Original Message-----
>From: Sadaf_Choudhry
>Sent: Friday, September 24, 2004 11:21 AM
>To: Ant Users List
>Subject: RE: Problem with junitreport and ant 1.6.2
>
>I think I should point out that I am talking about the problem below:
>
>  java.lang.NoClassDefFoundError:
>org/apache/tools/ant/taskdefs/optional/junit/XalanExecutor
>
>Now I had defined junitreport task and had ant-junit.jar and junit.jar
>in classpath And XalanExecuter.class is a part of ant-junit.jar...
>         <taskdef name="junitreport"
>classname="org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggrega
>tor">
>             <classpath>
>                 <fileset dir="${ext}">
>                     <include name="**/*.jar"/>
>                 </fileset>
>             </classpath>
>         </taskdef>
>
>So why this exception?
>When I put junitreport specific classes in a separate jar and put it in
>ant_home/lib, it works (maybe because ant_home/lib is added to
>classpath)  And I don't get the exception.. Why? Is this a bug?
>
>Sadaf
>
>-----Original Message-----
>From: Sadaf_Choudhry
>Sent: Friday, September 24, 2004 10:24 AM
>To: user@ant.apache.org
>Subject: Problem with junitreport and ant 1.6.2
>
>Hi all,
>
>I have upgraded to ant 1.6.2.
>I want to keep my junit.jar out of ant_home/lib.
>
>So I kept ant-junit.jar and junit.jar in a separate directory (ext).
>
>In my build script I have
>
>         <taskdef name="junit"
>classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
>             <classpath>
>                 <fileset dir="${ext}">
>                     <include name="**/*.jar"/>
>                 </fileset>
>             </classpath>
>         </taskdef>
>
>         <taskdef name="junitreport"
>classname="org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggrega
>tor">
>             <classpath>
>                 <fileset dir="${ext}">
>                     <include name="**/*.jar"/>
>                 </fileset>
>             </classpath>
>         </taskdef>
>
>While running tests, i get :
>
>[junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 6.313 sec
>BUILD FAILED
>C:\home\sadaf\work\Engineering\Configuration\ant\testbuild.xml:180: The
>following error occurred whi le executing this line:
>java.lang.NoClassDefFoundError:
>org/apache/tools/ant/taskdefs/optional/junit/XalanExecutor
>
>I do not have ant-junit.jar inside ant_home/lib anymore:
>
>I figure that is the problem...
>So I broke ant-junit.jar and put the classes related to junitreport into
>a separate jar, junitreport.jar.
>I put this junitreport.jar inside ant_home/lib... and it worked..!!
>
>But when I tried to look this thing up, I found nothing on the net (read
>google)..
>Seems nobody else had this problem... So I wonder if the way I tried it
>was wrong...
>Is there anybody who could get junit.jar out of ant_home/lib smoothly?
>and how did you do it??
>(I am not very comfortable breaking jars)
>
>if anybody has something to say on this, please do reply  ...
>
>Thanks
>Sadaf
>
>PS: sorry for the big mail
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional
>commands, e-mail: user-help@ant.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org


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


Mime
View raw message