I'm trying to automate a set of functional tests using the 1.0 development
release of Jelly and Ant 1.5.

My Ant build script calls a Jelly script (via the Jelly Ant task) which then
itself can use other Ant tasks - in particular Exec.  The Ant 1.5 exec task
provides a facility to specify an output property for the return code of the
process.  I'm trying to read this value from the calling Jelly script,
however even though the property is set by the Ant task it cannot be seen by
the Jelly script.

A quick look through the Jelly source code it appears that multiple Ant
projects are being created - the second one during the AntTagLibrary
initialisation.  The result is that the call to Ant exec sets a property
within the second project rather than the Ant environment passed originally
passed to the Jelly script.

The initial Ant project is passed down to the Jelly script and can be used
to read Ant project properties correctly.  The tag library is registered
with the JellyContext (as a TagLibrary object) with the calling Ant project
(AntTagLibrary(Project) constructor is used).  This is fine since the
JellyContext will now find the tag library when the jelly:ant name space is
used.  However following this initialisation the XML parser initialises the
tag libraries within the Jelly script using the tag library class names
(Strings) which removes the previously initialised Ant tag library - so we
now lose the original Ant project.  The new AntTagLibrary is then
constructed, a new Ant project is constructed and we lose the ability for
Ant tasks to set properties that the jelly script can see.

May be I've missed something in the way I'm trying to use Ant with Jelly and
wasn't sure whether anyone was aware of this problem ?



Darren



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to