ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sadaf_Choudhry" <Sadaf_Choud...@infosys.com>
Subject Problem with junitreport and ant 1.6.2
Date Fri, 24 Sep 2004 04:54:24 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message