Lists Home |
Date Index |
* Peter Hunsberger <email@example.com> [2005-02-02 11:13]:
> On Wed, 2 Feb 2005 10:57:23 -0500, Alan Gutierrez
> <firstname.lastname@example.org> wrote:
> <snip>on topic XSLT in Ant discussion</snip>
> > ~ Recently, I offered to provide build scripts for an XML open
> > source project. When they heard that the process would be.
> > svn checkout http://foo.com/svn/foo
> > cd foo
> > ant -f mix.bootstrap.xml
> > ant
> > They rejected it for the third line. And Ant script /should/
> > just work from checkout.
> > But for any project of any real size, it doesn't.
> > Generally, the checkout includes an endoresed ant and a pair of
> > build.sh, build.bat files that set the system class path,
> > because Ant classpath directives, for many tasks are defeated by
> > the $ANT_HOME/lib directory.
> Not sure I understand all your issues here, but isn't the common way
> of handling Ant script customization via proprieties files that are
> read in as the first step of the Ant script? Our scripts have no
> dependencies on environment variables but do define default
> proprieties that can be overridden by user proprieties files.
No, the issues are class path issues.
To run Saxon 8 you need to alter the class path, or drop Saxon 8
in $ANT_HOME/lib, just as you have to drop junit.jar in
$ANT_HOME/lib to run JUnit tests.
A default Ant installation will go so far as to defeat JAXP's
ability to load a user specified TranformerHandlerFactory.
You are so not going to get the Transformer you want.
Since these are CLASSPATH issues, the custom build.(bat|sh)
scripts are necessary to set the CLASSPATH.
I've avoided them by hacking a copy of XSLTProcess.
I put it, and it's minions, in a different package (i.e.
package com.agtrz.mix.ant;), so the Ant ClassLoader won't load
them at startup from $ANT_HOME/lib. So that they will load when
called as part of a <taskdef/> with a <classpath/> specified
that will point to Saxon 8.2, DOM 3.0, and JAXP 1.3.
Blah, blah, blah. It wasn't simple. Did my homework.
Definately not a *.properties versus env issue.
Thanks, though. :^)
Alan Gutierrez - email@example.com