ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Genter" <rgen...@silverlink.com>
Subject RE: Question about "depends" attribute in the target element
Date Mon, 12 Nov 2007 19:02:57 GMT
> From: broken connection [mailto:brokenconnection@gmail.com] 
> Sent: Monday, November 12, 2007 11:01 AM
> To: Ant Users List
> Subject: Re: Question about "depends" attribute in the target element
> 
> Thanks Glenn,
> Here's a small test script that i wrote that simulates my 
> environment and
> proves my findings:
> 
> build.xml:
> <project>
>     <target name="first">
>         <echo message="target First" />
>     </target>
> 
>     <target name="second" depends="first">
>         <echo message="target Second" />
>     </target>
> </project>
> Output:
> 
> C:\Documents and Settings\mick\Desktop\test>ant first second
> Buildfile: build.xml
> 
> first:
>      [echo] target First
> 
> first:
>      [echo] target First
> 
> second:
>      [echo] target Second
> 
> BUILD SUCCESSFUL
> Total time: 0 seconds
> C:\Documents and Settings\hjhutty\Desktop\test>
> 
> It clearly shows that the first target is run multiple 
> times.Can someone
> please correct my understanding as to why this is happening.

Ant targets specified on the command line are invoked independently;
it's as if you specified "ant first ; ant second", with the caveat that
any properties defined during the execution of the first target will
still be defined when the second target is executed.
--
Rick Genter
Principal Software Engineer
Silverlink Communications
rgenter@silverlink.com
www.silverlink.com
Office (781) 425-5763
Mobile (781) 771-9677
 

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


Mime
View raw message