ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 29930] - some thing like static blocks of java
Date Tue, 17 Aug 2004 06:43:24 GMT
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 Nagendra.Raja@sun.com  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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message