> From: broken connection [mailto:[EMAIL PROTECTED] 
> 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
[EMAIL PROTECTED]
www.silverlink.com
Office (781) 425-5763
Mobile (781) 771-9677
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to