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 10276] - [PATCH] added <import> declaration in project to include other projects
Date Wed, 10 Jul 2002 07:13:29 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10276>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10276

[PATCH] added <import> declaration in project to include other projects





------- Additional Comments From nicolaken@apache.org  2002-07-10 07:13 -------
J.Pietschmann suggested me to look at xslt for inspiration, and now I agree 
that some kind of inherit can be done while keeping my concens in check.

Suppose this target:

<target name="mytarget" depends="a,b,c">...</target>

is in a file that is imported by my buildfile.

Composition means:

<target name="mylocaltarget" depends="a,b,c">
  <dostuff1/>
  <antcall target="mytarget">
  <dostuff2/>
</target>

With this I can run "mylocaltarget" as an enhanced "mytarget".
What I /cannot/ do, as you pointed out, is have all the targets that depend on 
mytarget depend on mylocaltarget instead.
What could be done is callbacks, like:

<target type="pre" name="mytarget">
  <dostuff1/>
</target>

<target type="pre" name="mytarget">
  <dostuff2/>
</target>

Which I really don't like, since other imports can do the same in a difficult 
to control manner and things get out of control.

New way I like:

<target name="mytarget" inheritdeps="true" depends="additionaldeps">
  <dostuff1/>
  <apply-import/>
  <dostuff2/>
</target>

So I will change "import" to "include" and make the new import stuff.

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


Mime
View raw message