ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vimil Saju <>
Subject Re: Unexpected behaviour creating dynamic ANT task via XSLT and executing via bat file
Date Wed, 09 Mar 2011 17:22:25 GMT
The reason for the behavior is because the batch file runs in a separate process. To prevent
this behavior, instead of executing the batch file from the main build.xml, you can directly
invoke the generated build.xml from the main build.xml using the subant task. Doing this makes
the generated build.xml run in the same process as the main build.xml. 

Hope my explanation helps

--- On Wed, 3/9/11, Mario Madunic <> wrote:

> From: Mario Madunic <>
> Subject: Unexpected behaviour creating dynamic ANT task via XSLT and executing via bat
> To: "" <>
> Date: Wednesday, March 9, 2011, 9:13 AM
> (Ant 1.8.2, XP SP3)
> Background:
> I’m using ANT to pipeline my conversion of XML (Excel) to
> PDF via the command line. So I chunked up the various steps
> into separate project files and import into the build.xml.
> At one point an XSLT created a bat file to copy required
> SVGs locally for use in the PDF. The bat file was executed
> using the <exec> task. A requirement came up to strip
> the DTD declaration out all the SVGs, so instead of creating
> a simple bat file to copy each SVG required it was changed
> to create a build file. In the build file are <copy>
> tasks and <filterchain> <tokenfilter> to strip
> out the DTD declaration. This ANT build does not exist as
> part of the main build.xml but executed within right after
> it has been created via XSLT. Hopefully that is clearer than
> mud.
> So here is the unexpected or unusual (at least to me)
> behaviour. When the copy SVGs ANT build is executed and I
> hit ctrl C to stop the process to check the few files that
> have been copied over, the copy SVG build is still running
> in the background even though the main build.xml has been
> stopped. Is this behaviour correct and expected? I’m just
> curious more than anything and am not really looking for a
> solution. (To stop it copying I open the task manager and
> terminate the java task running.)
> Marijan (Mario) Madunic
> Publishing Specialist
> New Flyer Industries
> ________________________________
> Please consider the environment before printing this
> e-mail.
> CONFIDENTIALITY STATEMENT: This communication (and any and
> all information or material transmitted with this
> communication) is confidential, may be privileged and is
> intended only for the use of the intended recipient. If you
> are not the intended recipient, any review, retransmission,
> circulation, distribution, reproduction, conversion to hard
> copy, copying or other use of this communication,
> information or material is strictly prohibited and may be
> illegal. If you received this communication in error or if
> it is forwarded to you without the express authorization of
> New Flyer, please notify us immediately by telephone or by
> return email and permanently delete the communication,
> information and material from any computer, disk drive,
> diskette or other storage device or media. Thank you.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message