ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "BOUSQUET Jeremie" <Jeremie.BOUSQ...@gemplus.com>
Subject RE: [ANT 1.6.5] junitreport task using taskdef
Date Mon, 08 Aug 2005 16:45:06 GMT
Hi again, I tried to add all ant-*.jar dependencies manually in my junitreport taskdef but
it did not work.
So I tried option 3 : add them manually in -lib ant command line, what I wanted to avoid,
but it works ...

Anyway if you know this problem I'm still interested...

Thanks
Jeremie 

> -----Original Message-----
> From: BOUSQUET Jeremie [mailto:Jeremie.BOUSQUET@gemplus.com] 
> Sent: lundi 8 août 2005 16:57
> To: user@ant.apache.org
> Subject: [ANT 1.6.5] junitreport task using taskdef
> 
> Hello,
> 
> Following this article:
> http://ant.apache.org/faq.html#delegating-classloader-1.6
> 
> ... I removed ant-junit.jar from ANT_HOME/lib, and taskdefed 
> junit task as follow, which worked very well :
>         <taskdef name="junit" 
> classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
>             <classpath>
>                 <pathelement 
> location="${myrepository}\ext\apache\ant\1.6.5\ant-junit.jar"/>
>                 <pathelement 
> location="${myrepository}\ext\junit\junit\3.8.1\junit.jar"/>
>             </classpath>
>         </taskdef>
> 
> By the way I'm using junitreport task which needs 
> ant-junit.jar as well, so I had to taskdef it also this way :
>         <taskdef name="junitreport" 
> classname="org.apache.tools.ant.taskdefs.optional.junit.XMLRes
> ultAggregator">
>             <classpath>
>                 <pathelement 
> location="${myrepository}\ext\apache\ant\1.6.5\ant-junit.jar"/>
>                 <pathelement 
> location="${myrepository}\ext\junit\junit\3.8.1\junit.jar"/>
>             </classpath>
>         </taskdef>
> 
> ... but this does not work. 
> I get following error when executing junitreport:
> java.lang.NoClassDefFoundError: 
> org/apache/tools/ant/taskdefs/optional/junit/XalanExecutor
>         at 
> org.apache.tools.ant.ProjectHelper.addLocationToBuildException
> (ProjectHelper.java:539)
>         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:384)
>         at 
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:107)
>         at 
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:341)
>         at org.apache.tools.ant.Target.performTasks(Target.java:369)
>         at 
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
>         at 
> org.apache.tools.ant.Project.executeTarget(Project.java:1185)
>         at 
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(Def
> aultExecutor.java:40)
>         at 
> org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>         at org.apache.tools.ant.Main.runBuild(Main.java:668)
>         at org.apache.tools.ant.Main.startAnt(Main.java:187)
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
> 
> This class in my opinion is from ant-junit.jar, so I don't 
> understand why it can find ant-junit.jar, junit.jar (because 
> junit task works), and why for junitreport it can't find a 
> class in ant-junit.jar ...
> I thought maybe it was looking for xalan stuff, and reported 
> error only on XalanExecutor class if this is dynamic class 
> loading, so I added all xalan-j_2_7_0 stuff (serializer.jar, 
> xalan.jar, xml-apis.jar, xercesImpl.jar) in my taskdef but it 
> didn't work better ...
> 
> I searched bugzilla and archived user list before posting 
> (maybe badly ? Hope not ;) ).
> 
> Any help is welcome,
> 
> Thanks,
> 
> Jérémie Bousquet
> -----------------------------
> 
> 

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


Mime
View raw message