DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29930>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29930

some thing like static blocks of java





------- Additional Comments From [EMAIL PROTECTED]  2004-08-17 06:43 -------
can you use the cmd 'ant src packages' at this time init is being called twice.

Any case, I suppose even in cmd ant -f build.xml, the init must be called 
twice. Run time can't optimize on its own as this may break in some places. 
This was my understanding of depends on  a target (i.e ant runtime does not do 
any thing to optimize the depends targets). Is there any document which talks 
about this optimized behaviour ant runtime. 

Try this modified code 

<project default="all">
  <target name="init">
    <echo>init called</echo>
  </target>

  <target name="src">
        <antcall target="init"/>
  </target>
  
  <target name="packages" depends="init"/>
  
  <target name="all" depends="src,packages"/>
</project>

Don't ask me why user would call this way.. If we have static kind of keyword 
supported by ant at target level, then run time has every right to call init 
only once and not otherwise.

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

Reply via email to