ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David McTavish <>
Subject Conditional echo
Date Tue, 05 Nov 2002 19:04:28 GMT

Hi all,
I was wondering if anybody could provide some insight in how I could
conditionaly "echo" a message. Basically, what I would like to do is echo a
message if the target was called from within the same build script
(build.xml), but not if it was called from an external source. I was
thinking I could pass in a property when I make external calls to set the
level of verbosity to off.

	<ant dir=".." target="" inheritall="false">
		<property name="verbose" value="false" />

However, I'm not sure how I can write my echo tasks to handle this
conditional property. I'd really like to avoid having to write two separate
targets for every 'echo' that is based on the if/unless conditions if


<property name="verbose" value="true"/>

<target name="">
	<echo message="status report 1"/>


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

View raw message