ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Denner <m...@denner.demon.co.uk>
Subject Ant <style> task failing even though I think I've follow the FAQ
Date Thu, 07 Aug 2003 09:08:46 GMT
Hi,

I followed the FAQ entry about delegating classloaders 
(http://ant.apache.org/faq.html#delegating-classloader) for my junit 
task: I moved the optional.jar from the lib directory and taskdef junit, 
and that worked fine.  But when I applied the same logic to the style 
task I got the exception included at the end of this email.

I'm running under Linux with JDK 1.4.2 and using Ant 1.5.3, and my 
build.xml contains:

   <target name="build.docs" depends="">
     <style style="${src.dir.buildjars}/docbook/fo/docbook.xsl"
            extension=".fo"
            basedir="${src.dir.docs}"
            destdir="${build.dir.docs}">
       <include name="*.xml"/>
       <classpath>
         <path location="${ant.home}/optional/optional.jar"/>
       </classpath>
     </style>
   </target>

Note that I tried taskdef'ing another docbookstyle task that used 
org.apache.tools.ant.taskdefs.XSLTProcess (along with the optional.jar 
in the classpath element) but it gives the same error.

Is it just that I need to move this 
org.apache.tools.ant.taskdefs.XSLTProcess class out of the ant.jar file 
and into it's own JAR, possibly the optional.jar?

Matt

     [style] Transforming into /home/builder/build/docs
     [style] Processing /home/builder/docs/doc.xml to 
/home/builder/build/docs/doc.fo
     [style] Loading stylesheet 
/home/builder/lib/build/docbook/fo/docbook.xsl

BUILD FAILED
java.lang.NoClassDefFoundError: 
org/apache/tools/ant/taskdefs/optional/TraXLiaison
         at 
org.apache.tools.ant.taskdefs.XSLTProcess.configureLiaison(XSLTProcess.java:743)
         at 
org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:486)
         at 
org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:259)
         at org.apache.tools.ant.Task.perform(Task.java:341)
         at org.apache.tools.ant.Target.execute(Target.java:309)
         at org.apache.tools.ant.Target.performTasks(Target.java:336)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
         at org.apache.tools.ant.Main.runBuild(Main.java:609)
         at org.apache.tools.ant.Main.start(Main.java:196)
         at org.apache.tools.ant.Main.main(Main.java:235)


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


Mime
View raw message