ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Louis BOUDART" <jeanlouis.boud...@gmail.com>
Subject Re: EasyAnt <use>/<extends> vs <import>
Date Thu, 06 Nov 2008 10:42:38 GMT
> > IIUC EasyAnt solits the two use-cases found for <import> into two
> > > logical tasks.
> > >
> > > * you never want to override a target, you just want to reuse them:
> <use>
> >
> > That's an <include> to me. Rename <use> into <include>, and I'm
+1,
>
> I'm not bound to names.

+1 =)


>> I'm not totally sure whether the as-attribute would make sense for
> >> <extends> as well, EasyAnt currently silently ignores it in that case.
> >
> > It makes as much sense in <import> as it does in <include> to me, i.e.
> > to restore proper compartmentalization of the builds.
>
> I'd probably want to allow it for symmetry as well, but I haven't
> thought through all implications.


I'm not sure that adding an as-attribute make sense for <extends>.

In our POC you can "import" with <use> mode the same file with different
prefix.
exemple :
<project name="Abstract-Module">
...
</project>

<project name="Concret-Module1">
<use file="Abstract-Module" as "AbstractModuleConcret1"/>
...
</project>

<project name="Concret-Module2">
<use file="Abstract-Module" as "AbstractModuleConcret2"/>
...
</project>


<project name="genericBuild">
<extends file="Concret-Module1"/>
<extends file="Concret-Module2"/>
</project>

I guess adding an as attribute on <extends> is like having only one import
mode where we can add prefix, and i'm not sure this is the solution.
IMHO  we need those two kind of import:

   - <extends> similar to the actual <import>


   - <use> is like a "Rich" <import> that support namespace and that allow
   you to import many time the same build script with different namespace.

That's why i think "as attribute" should be used only with <use>.

What do you think about it?



>
> > I don't think we should invent new terminology (use/extends) for
> > something that already exists (import) and it's natural equivalent to
> > use (include, which doesn't exist).
>
> Then we need to stretch the difference.  Two new names would increas
> awareness that <import> does something special.
>
> > What's missing from the above is the notion of TargetGroup to
> > implement the phase concept of EasyAnt (and Maven I guess).
>
> True.  To me those concepts are orthogonal and I'd like to have
> separate discussions on them (and picked this topic to be first).

Nice :)

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message