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 27116] - Imported target depends not preserved when overridden
Date Tue, 16 Mar 2004 23:57:20 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=27116>.
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=27116

Imported target depends not preserved when overridden





------- Additional Comments From gudnabrsam@yahoo.com  2004-03-16 23:57 -------
I was originally bothered by this myself to some degree but a little thought 
puts it in perspective.  Think of it in terms of Java methods.  Overridden 
methods don't just behave as the overridden methods on the parent class; if you 
want to either mimic or inherit behavior you have to either

a) do what the overridden method does, or
b) call super.methodname()

In Ant you should be able to accomplish (a) by duplicating the depends 
attribute.  You should be able to accomplish (b) in this manner:

assuming your <import>ed  file contains <project name="parent">...</project>,

<target name="overridden" depends="parent.overridden">...</target>


That's a guess, but it should work.

-Matt

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


Mime
View raw message