ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexey Solofnenko <A.Solofne...@mdl.com>
Subject RE: date?
Date Tue, 13 May 2003 19:15:34 GMT
Hello Kevin,

  <antcall> uses its own environment, so all properties set during <antcall>
are not propagated to its caller.

- Alexey.

--
{ http://trelony.cjb.net/ } Alexey N. Solofnenko
Pleasant Hill, CA (GMT-8 usually)


-----Original Message-----
From: Duffey, Kevin [mailto:KDuffey@marketron.com] 
Sent: Tuesday, May 13, 2003 12:11 PM
To: Ant Users List
Subject: RE: date?

You know, it's not working. I do this:

<target name="deploy">
	<antcall target="date"/>
	<echo message="${build.date}  ${build.time}"/>
	<antcall target="drop"/>
</target>

<target name="date">
	<tstamp>
		<format pattern="MMddyyyy" property="build.date"/>
		<format pattern="hhmmss" property="build.time"/>
	</tstamp>
	<echo message="${build.date}  ${build.time}"/>
</target>

<target name="drop">
	<copy file="${dist.dir}/file.zip"
tofile="${drop.dir}/archive/file-${build.date}-${build.time}.zip"
overwrite="true"/>
</target>

When I run the deploy target, the call to the "date" target DOES echo the
right date/time in the right format. The <echo> AFTER the date target and
before the drop target (in the deploy target) prints out ${build.date}
${build.time}.

The file that gets dropped to the ${drop.dir} shows
file-${build.date}-${build.time}.zip and NOT the actual date and time.

So what am I missing? I thought perhaps because I didn't declare the
build.date and build.time as properties above, so I tried that and that
doesn't do anything either. Is this a bug with ANT? I am assuming I am doing
something wrong here.



 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.467 / Virus Database: 266 - Release Date: 4/1/2003
 


***********************************************************
The information contained in this e-mail message may be 
confidential and  protected from disclosure. If you are 
not the intended recipient, any dissemination, distribution
or copying is strictly prohibited. If you think that you 
have received this e-mail message in error,
please e-mail the sender at exchangeadmins@marketron.com
***********************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

Mime
View raw message