ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brown, Carlton" <>
Subject RE: <apply> outputproperty not capturing output
Date Tue, 29 Aug 2006 17:49:05 GMT
Sorry for the repeat, but this is baffling and looks either buggy or
ill-designed, and we really need to understand how it works... could
someone shed some light?

-----Original Message-----
From: Brown, Carlton 
Sent: Monday, August 28, 2006 6:33 PM
Subject: <apply> outputproperty not capturing output

Hi all,

Basic question:  What is the real significance of the "outputproperty"
attribute of the <apply> task?  Is this just some kind of race condition
where Ant applies the output of whichever command invocation happens to
run first?

Observation:   If I <apply> a command to more than one file, and the
command produces output for only certain files, I don't see any of the
output in the property defined by "outputproperty".   I can however see
it if I limit the <apply> fileset to only one file, (effectively making
it an <exec> and not what I'm looking for).

Situation:   I'm running an <apply> task (code below) that processes
about 48 idl files.  Since this is a crappy idl compiler that happily
returns a zero exit status when it fails, I'm forced to parse the output
to detect failures.   Since I use <apply> to apply the idlj program to
all 48 IDL files, I want to parse the output of all 48 command
invocations for a certain failure string.  So I use the "contains"
condition.   However, I notice that the output doesn't get captured in
the outputproperty if I apply to more than one file.

Some code:

	<target name="generate-netxidl" depends="init">
		<apply executable="${idl.compiler.path}"
failonerror="true" failifexecutionfails="true"
			<arg value="-f"/>
			<arg value="all"/>
			<arg value="-pkgPrefix"/>
			<arg value="idl"/>
			<arg value="${netxidl.package.prefix}"/>
			<arg value="-td"/>
			<arg value="${generation.output.dir}"/>
			<arg value="-i"/>
			<arg value="${idl.src.path}/netx"/>
			<arg value="-noWarn"/>
		<!-- If  I set the fileset below to a very specific name
instead of a wildcard, 
		the output gets assigned to netx.idlj.output and this
fails as expected.  Otherwise, it doesn't -->
		<fileset dir="${idl.src.path}/netx" includes="*.idl"/>
		<fail message="netx idl generation failed with this
string="${netx.idlj.output}" substring=" (line "/>


The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential, proprietary, and/or
privileged material. Any review, retransmission, dissemination or other
use of, or taking of any action in reliance upon this information by
persons or entities other than the intended recipient is prohibited. If
you received this in error, please contact the sender and delete the
material from all computers. GA622

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

View raw message