ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tharp, Joshua L, SOLGV" <>
Subject RE: Difficulty with "unless" attribute
Date Thu, 12 Jun 2003 16:13:44 GMT
You say that the target keeps being run, and that the timestamp keeps
being changed. Properties are immutable, so I don't see how that is
happening. Are you using the antcall or ant tasks? Perhaps you are not
allowing your properties to be inherited when you use one of these
tasks. Unless I'm missing something very fundamental about the way you
have your build setup or I have a gross misunderstanding on how Ant
treats properties in the case of a timestamp, I don't see how you can
have the problems you describe.


-----Original Message-----
From: Maurer, Justin [] 
Sent: Thursday, June 12, 2003 8:40 AM
Subject: Difficulty with "unless" attribute


	Much FAQ-reading and Google searching has led me here. I'm
having some difficulty with the "unless" attribute of the <target> task.
I have a target, currently named init, with the sole purpose of setting
a property to be used as a buildstamp. Presently, it looks like this:

<target name="init" unless="buildstamp>
		<format property="buildstamp" pattern="yyyyMMdd-HHmm"/>
	<property name="buildstamp" value="blah"/>

(the <property name...> doesn't affect the results - i put it in just to
be sure the property was being set...). I can refer to ${buildstamp}
later in the file, once this target has been executed, but this target
_keeps_ getting run, and buildstamp keeps getting changed (the
lowest-level module we have depends on init, other resources depend on
this module..).

Thanks for any assistance, my sincerest apologies if I've asked a silly
question (I checked the FAQs!)!

Justin Maurer
Software Configuration Engineer
Defywire, Inc.


"Enabling the Enterprise"

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

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

View raw message