ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <anto...@gmx.de>
Subject Re: Typdef/taskdef behaviour and introspection
Date Mon, 27 Dec 2004 10:28:47 GMT
Hello,
Edouard,
do not forget also that xalan is part of JDK 1.4 (I guess also of 1.5).
Starting ant or java with a -Djava.endorsed.dirs="path to xalan.jar" or 
create a directory $JAVA_HOME/jre/lib/endorsed and put the version of 
xalan you need there might help.
Cheers,
Antoine
Jacob Kjome wrote:

>
> When your task performs XSLT, does it programmatically use Ant's XSLT 
> task to perform the transformation or is it completely separate from 
> any Ant specifics?  If the former, then you are out of luck because 
> your task would have to be at the same level as, or a parent of, Ant's 
> main classloader.  If the latter, I'm not sure why this wouldn't work?
>
> Jake
>
> At 03:48 PM 12/26/2004 +0100, you wrote:
> >Hi to all;
> >
> >Having faced a problem too long without precise answer. My problem is 
> the
> >following.
> >
> >I have developed an Ant task that performs XSLT inside. So far, so good,
> >provided I put my XSLT implementation in Ant 'lib' directory, the 
> task works
> >fine.
> >
> >But as soon as I try to refer to this task via the 'typedef' task with a
> >provided classpath that contains both my task jar and the XSLT
> >implementation jar (having remove any implementation from Ant 'lib'
> >directory at the same time) - this implementation is either 
> saxon-6.2.2.jar
> >or xalan-2.4.1.jar - the implementation task cannot load.
> >
> >With Xalan, I get this
> >
> >javax.xml.transform.TransformerFactoryConfigurationError : Provider
> >org.apache.xalan.processor.TransformerFactoryImpl not found
> >
> >problem, which demonstrates that the JRE cannot find such an 
> implementation,
> >though it is present in my 'typedef' declaration (for sure).
> >
> >As I understand, the Java XSLT API performs introspection by creating an
> >instance of the 'javax.xml.transform.TransformerFactory' abstract 
> class, and
> >by looking at the Java system 'javax.xml.transform.TransformerFactory'
> >property.
> >
> >My question is: how to make all this work?
> >
> >A piece of answer would be: how to force the underlying class loader 
> of the
> >Ant 'typedef' task to load the whole content of a jar (even those 
> that may
> >be used by introspection), instead of just loading the classes 
> declared and
> >discovered at compile time?
> >
> >I really need to separate my XSLT implementation and my task from Ant 
> 'lib'
> >directory!
> >
> >Thank you very much for your attention, and I hope that a Java class 
> loader
> >can indicate how to solve that.
> >
> >Cheers and happy all,
> >Edouard
> >
> >




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


Mime
View raw message