You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2004/07/06 11:32:28 UTC
DO NOT REPLY [Bug 29930] New: -
some thing like static blocks of java
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
Summary: some thing like static blocks of java
Product: Ant
Version: 1.1
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Core
AssignedTo: dev@ant.apache.org
ReportedBy: Nagendra.Raja@sun.com
Hi!
Not sure if it is good idea to apply OOAD Featurs to ant. But any way I posting
this for a discussion and some conclutions there after..
I am looking for some kind of static targets, meaning how may ever time this
targets called (using dependends attribute), but ant run time should run this
target only once.
eg.
<target name="init">
</target>
<target name="src" depends="init">
</target>
<target name="packages" depends="init">
<target name="all" depends="src,packages"/>
when target 'all' is called init gets called twice, which could be avoided if
static attribute is supported by ant eg. one could write static targets as
<target name="init" static="true">
</target>
I do see some workaround like below which would have the same effect.. but I
consider this as less readable
<target name="init" unless="isInitRanOnce">
<property name="isInitRanOnce" value="true"/>
</target>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org