ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles Scokart" <gscok...@gmail.com>
Subject Re: Yet an other view for target-group
Date Sat, 22 Nov 2008 11:04:30 GMT
On top of the EasyAnt phase concept, a partOf relationship allows to
more ellegantly implements bla-bla-only patterns pretty usefull to
debug a script more quickly, but also sometimes quiet anoying because
too verbose.

For example, we can have :


<target-group name="test" depends="compile"/>

<target-part name="test-only" partOf="test">
...
</target>


Most user would invoke ant test.  They don't need to ba aware (and
even not informed) about how this target is implemented.
But some most advanced user, that are aware of the implementation
details, might invoke ant test-only in some scenario.

An other case where higher level aggregation might be usefull is the
"check-if-required,do" pattern.
Instead of having a target that expose all its implementation :
<target name="compile" depends="check-compilation-required,do-compile"/>
<target name="check-compilation-required">...</target>
<target name="do-compile" unless="skip.compile">...</target>

<target-group name="compile"/>
<target-part name="check-compilation-required" partOf="compile">...</target>
<target-part name="do-compile" depends="check-compilation-required"
partOf="compile" unless="skip.compile">...</target>

A normal use will see only the target compile, while a more advanced
user can use the sub-part of compile.


2008/11/21 Gilles Scokart <gscokart@gmail.com>:
> The concept of target-group seems confusing for the moment.  I would
> like to try to prpopose an other view to see if it bring more
> concensus.
>
> Instead of having one special type of target to define a new concept,
> maybe we need 2 : target-group and target-part.
>
> With the caracteristics that :
> * target-group and target-part can both have depends to any target.
> * target-part can declare that they are part of 1 or more target-group.
> * target-group have no content (not sure that's require for the view
> that we want).
>
> At execution, everything behave like if the content of the target-part
> were executed inside that target-groups (possible multiple time if the
> part is part of multiple group).  The depends of the part being
> transfered to the group.
>
> I think this view support the high granularity build, with a clear
> layering without conflicting with the current depends relationships.
>
>
> --
> Gilles Scokart
>



-- 
Gilles Scokart

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


Mime
View raw message