ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vaughan Jackson" <vaughan.jack...@tumbleweed.com>
Subject Problems with Ant Style Task Classpath Bug 3934 Workaround
Date Fri, 25 Jan 2002 00:04:15 GMT
Hi,
 
I am trying to apply the workaround described in the additional
comment at the end of the bugzilla report for bug 3934 at 
 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3934
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3934> 
 
The comment is this:
 
------- Additional Comments From  <mailto:bodewig@apache.org> Stefan Bodewig
2001-10-19 01:04 -------

The problem is that optional.jar is in the system classpath, thus
XalanLiaison

will be loaded from the system classloader, which doesn't know anything
about

the classpath you have specified.



The only solution for you is to remove optional.jar from ANT_HOME/lib and
add

an entry for it to the classpath of your <style> task.



I'm afraid this cannot be fixed (at least not in the context of Ant 1.x).
I now have separated out the optional jar file into a separate directory,
and have a style task that looks like this:
 
    <!-- Use XSLT to generate the taglib documentation -->
    <style   basedir="${xslt.documents}" 
             destdir="${src.doc}"
             extension=".html" 
             style="${xslt.stylesheets}/taglibDoc.xsl" 
             includes="${xslt.includes}" 
             processor="trax" > 
      <classpath>
        <pathelement location="${xalan.lib}/xalan.jar" />
        <pathelement location="${xalan.lib}/xml-apis.jar" />        
        <pathelement location="${xalan.lib}/xerces.jar" />
        <pathelement
location="${ant_optional.lib}/jakarta-ant-1.4.1-optional.jar" />
      </classpath>
    </style>
 
It is forcing the use of the trax processor, because it is using Xalan 2.2,
and Stefan
Bodewig says this is necessary for Xalan 2 (
http://www.mail-archive.com/ant-user@jakarta.apache.org/msg11179.html
<http://www.mail-archive.com/ant-user@jakarta.apache.org/msg11179.html> ).
 
However, it remains the case that the only way I can get the style task to
work is to
put the xalan.jar file in the ant lib directory or system classpath - which
cannot be
cleanly reproduced in an automated build. With the above style task, and
relocated
optional jar file, which is the intended workaround, I see this (similar)
error instead:
 
javax.xml.transform.TransformerFactoryConfigurationError: Provider
org.apache.xa
lan.processor.TransformerFactoryImpl not found
        at
javax.xml.transform.TransformerFactory.newInstance(TransformerFactory
.java:110)
        at
org.apache.tools.ant.taskdefs.optional.TraXLiaison.<init>(TraXLiaison
.java:93)
        at java.lang.Class.newInstance0(Native Method)
        at java.lang.Class.newInstance(Class.java:237)
        at
org.apache.tools.ant.taskdefs.XSLTProcess.resolveProcessor(XSLTProces
s.java:269)
        at
org.apache.tools.ant.taskdefs.XSLTProcess.getLiaison(XSLTProcess.java
:394)
        at
org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:14
1)
        at org.apache.tools.ant.Task.perform(Task.java:217)
        at org.apache.tools.ant.Target.execute(Target.java:184)
        at org.apache.tools.ant.Target.performTasks(Target.java:202)
        at org.apache.tools.ant.Project.executeTarget(Project.java:601)
        at org.apache.tools.ant.Project.executeTargets(Project.java:560)
        at org.apache.tools.ant.Main.runBuild(Main.java:454)
        at org.apache.tools.ant.Main.start(Main.java:153)
        at org.apache.tools.ant.Main.main(Main.java:176)
 
What am I doing wrong?
 
Thanks,
Vaughan.

___________________________________________________ 
Vaughan Jackson 
Development 
Tumbleweed Communications 
vaughan.jackson@tumbleweed.com / +1 (650) 216 2532 
___________________________________________________ 

 

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