ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vaughan Jackson" <vaughan.jack...@tumbleweed.com>
Subject RE: Antwort: Problems with Ant Style Task Classpath Bug 3934 Work around
Date Fri, 25 Jan 2002 15:44:13 GMT
Hi Toni,

Thanks for this suggestion. 

This sounds similar to something else I found 
that works. If I place the Xalan 2.2 xalan.jar 
file in the ant lib directory, or in the system 
classpath, before the build, the transformation 
works fine, with this much simpler style task 
element:

    <style   basedir="${xslt.sources}" 
             destdir="${src.doc}"
             extension=".html" 
             style="${xslt.stylesheets}/taglibDoc.xsl" 
             includes="${xslt.includes}" />

The problem is, I want to be able to be able to 
incorporate this XSLT task within an automated build, 
and do so in a clean manner. One thing I may have to 
do is have a script run as part of the build process 
that adds the path to this xalan.jar before invoking
the ant build containing this XSLT task....

A better solution would be to do it all from within 
the ant build file itself, but I can't see how to
do that at the moment.

Vaughan.

> -----Original Message-----
> From: Anton_Grimm@mn.man.de [mailto:Anton_Grimm@mn.man.de]
> Sent: Thursday, January 24, 2002 11:46 PM
> To: Ant Users List
> Subject: Antwort: Problems with Ant Style Task Classpath Bug 3934
> Workaround
> 
> 
> 
> I was facing the same problem this week
> with ant-1.3.
> 
> To solve the problem I built ant from source
> and exchanged jaxp.jar (1.0.1) und parser.jar in the lib-directory
> with the jar-files for jaxp-1.1 (jaxp.jar, crimson.jar, xalan.jar)
> before(!) building.
> 
> This works with optional.jar in the lib-directory for
> the <style>-task without the <process> attribute.
> 
> hope this helps
> 
> Toni
> 
> ****************************************************
> MAN Nutzfahrzeuge AG
> Anton Grimm
> Abt. IDP (SoftwareProduktionsumgebungen)
> Dachauerstr.667
> 80995 M√ľnchen
> 
> Tel.:      089/1580-1054
> Fax:      089/1580-911054
> E-Mail: Anton_Grimm@mn.man.de
> ****************************************************
> 
> 
>                                                               
>                                                               
>                     "Vaughan Jackson"                         
>                                                               
>                     <vaughan.jackson@tumbl        An:     
> "'ant-user@jakarta.apache.org'" <ant-user@jakarta.apache.org>     
>                     eweed.com>                    Kopie:      
>                                                               
>                                                   Thema:  
> Problems with Ant Style Task Classpath Bug 3934 Workaround        
>                     25.01.02 01:04                            
>                                                               
>                     Bitte antworten an                        
>                                                               
>                     "Ant Users List"                          
>                                                               
>                                                               
>                                                               
>                                                               
>                                                               
> 
> 
> 
> 
> 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/msg11
179.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
> ___________________________________________________
> 
> 
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:ant-user-help@jakarta.apache.org>
> 
> 


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


Mime
View raw message