ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: [Bug 28444] - Import: Target Handling Bug
Date Fri, 13 May 2005 10:21:15 GMT
On Fri, 13 May 2005, Phil Weighill Smith
<> wrote:
> On Fri, 2005-05-13 at 09:00 +0200, Stefan Bodewig wrote:
>> > But say the importER explicitly depends on .  Isn't this
>> > still going to pollute the log in the opposite way my
>> > implementation would? :) i.e.
>> > 
>> > [foo]:
>> > 
>> > []:
>> Yes.  But this is less likely than having the importer depend on
>> "foo" IMHO.  So in the normal case everything would look the same
>> as today and in border cases we'll get an additional empty target.
> If I understand what you're saying correctly, you don't expect
> importer build scripts to depend explicitly on the renamed imported
> targets.

No.  I fully expect importers to do so now.  And if they do they must
have overridden the target themselves, so what Matt descibes doesn't

Let's take your example and add a target.

> I'd disagree: we commonly "augment" the standard targets like this:
> standard.xml:
> <project name="standard">
>     <target name="compile">...</target>
      <target name="new-target"/>
> </project>
> build.xml:
> <project name="my-build" basedir="." default="compile">
>     <import file="${standard.dir}/standard.xml"/>
>     <target name="compile" depends="standard.compile">...</target>
> </project>

Today your build.xml can't use a target that depends on
"" as this target doesn't exist.

Peter's approach would create a copy of "new-target" with the name

Matt's approach would implicitly add a new target

  <target name="new-target" depends=""/>

to build.xml (which also renames the "new-target" in standard.xml to
"").  Now if you run

$ ant new-target

the output will be

| new-target:

and you see that new-target has been imported from standard.

My approach would adds

  <target name="" depends="new-target"/>

to build.xml.  "ant new-target" still looks the same as it would if we
don't add a target at all.  But now if you use

$ ant

the output will be

| new-target:

So in either case you get to see an implementation detail - the empty
target that either Matt or I wanted to introduce.  I simply claimed
that Matt's case was more likely to happen than mine since you can't
depend on "" or invoke "ant" at
all today.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message