ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Siberski, Wolf" <>
Subject RE: public vs. private targets
Date Fri, 23 Feb 2001 10:06:37 GMT
There has been a discussion about that a
long while ago. IIRC the result was that
the attribute 'description' was introduced.
Targets which have a value for that attribute 
set are supposed to be 'main' targets which
may be called by end users, while the other
are regarded as 'subtarget's which should not 
be called directly.
The Ant engine doesn't check this however,
because the typical Ant user knows
what he is doing when calling a subtarget,
so there seemed no good reason to enforce
a restriction.

I think the only effect of this discussion
is seen when You use the Ant option
'-projecthelp'. For our VAJ Plugin we
also show only main targets.

I'm not sure if anyone (except me) still
cares about that distinction. It isn't
mentioned in the docs, and the Ant
buildfile itself has only one target
with description (javadoc). This is also
a sign that a new 'access' attribute,
although an appealing idea, seems not
to be needed by the Ant users.


> Jacob Martin wrote:
> Yes!  I was just thinking the same thing a couple of hours ago! 
> Wouldn't be too hard to put in either!
> Jake
> Milan Kubec wrote:
> > 
> > Hello,
> > I don't know if there was already discussion about this topic, but ...
> > 
> > It seems to me that could be usefull to be able to define what targets
> > in build script can be called (let's say public targets) and which
> > targets are only private to that script and can be called only form
> > inside the script from another targets. Let's say:
> > 
> > <target name="t1" depends="t2" access="public">
> > ...
> > </target>
> > 
> > <target name="t1" depends="t2" access="private">
> > ...
> > </target>
> > 
> > Does it make sense? I know it can be done by defining e.g. unless for
> > that target, but this is more straightforward and it doesn't need any
> > other properties.
> > 
> >   Milan
> > 

View raw message