ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <ddevie...@gmail.com>
Subject Re: Xslt when run from other dir from maven gets "Provider for javax.xml.transform.TransformerFactory cannot be found"
Date Thu, 08 Nov 2007 21:27:26 GMT
On 11/8/07, Karr, David <david.karr@wamu.net> wrote:
> JDK 1.4.2, Ant 1.5.4.

That's kinda old for Ant, no? I don't recall how Ant 1.5 worked that much.

> I developed an Ant script that uses an xslt task.  I tested it in the
> directory where I put it, and it works fine.
>
> I then went to another directory tree managed by maven, and executed
> some code in my "maven.xml" in a subproject that calls "ant:ant" and
> calls my build script from the other directory.  When I do this, I get:
>
>         Provider for javax.xml.transform.TransformerFactory cannot be
> found
>
> I read some notes that indicated that I need to copy "xalan.jar" to
> $ANT_HOME/lib.  I don't have it there already, but I do have
> "xml-apis.jar" and "weblogic.jar".

I thought JDK 1.4 included Xalan already...

> In any case, why does it work directly from the command line in the main
> directory, but fail with that exception when called from maven in the
> other directory?

Who knows what Maven does regarding class loading. It is forking a
separate VM for Ant, or setting up the Ant classpath itself? Since
this works with Ant, and fails with Maven, this may be more of a Maven
question than an Ant one.

> Before I implemented the reference to the "xslt" task, the build script
> previously used the "xmltask" library to do the same thing, and that
> worked well enough, both directly in the build script directory and
> remotely using maven.  I'm trying to get it to work with XSLT because
> the xmltask solution gets OutOfMemory exceptions for some of the larger
> test cases.

And how were you declaring <xmltask>? Using a nested classpath?
Putting xmltask.jar in $ANT_HOME/lib? On the CLASSPATH env. var?

Ant has changed quite a bit regarding class loading since 1.5 I
believe... I think the Ant launcher was introduced in 1.6 only (could
be wrong). --DD

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


Mime
View raw message