ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Siri <>
Subject RE: [VOTE] target-less build files
Date Fri, 19 Jul 2002 16:31:58 GMT
Interesting discussion.  I've been using Ant quite a bit recently, and have
been enjoying it.  Here is my 2 cents:

1. Do people want a build system or a scripting language?  Target-less files
and top-level tasks start to move Ant into the realm of scripting language
but without any of the built-in control constructs of a real scripting
language.  This can easily become a slippery slope as people see Ant as a
neat way to make a bunch of <task> calls but then get frustrated when trying
to use Ant for logic-heavy/algorithmic purposes that are hard to realize in
XML.  If I'm wrong and people just want to use top-level tasks for
initialization purposes then they should just use an "init" target that
everything depends on.  Targets force developers into a basic mindset that
will eventually help them generate better Ant files.  Heck, I'd even argue
that <property> tags, and even <taskdef> tags, should never have been
allowed outside of <target> tags in the first place (but I've only started
using Ant recently, so I'll keep those opinions to myself :)

But, hey, if people WANT to move Ant to be more general-purpose and
scripting-language-like, then I suppose that is fine.  But be aware of the
direction that could take it.  Whole new cans of worms can be opened up.

2. I don't buy the "removing the target requirement makes it easier for
newbies" argument.  Targets aren't too difficult to figure out and are one
of the basic constructs within a build system (which, for this argument, I'm
assuming Ant still is.)  You're not doing newbies any favors by allowing
them to ignore targets.  There is nothing difficult about:

<project name="foo" default="main">
	<target name="main">
	   ... fun and exciting stuff ...

And if the concepts put into practice above are too difficult for someone to
grasp then maybe a build system isn't what they are looking for.  This isn't
being elitist - just trying to stick to a basic standard.

3. Finally, maybe I missed something, but I don't see any problems these
suggestions are solving.  Do we want to risk compromising the integrity of
well-formed Ant build scripts to make a few fringe cases easier?

I don't mean to upset anybody but Ant is very cool and, so far, very clean
and focused.  I don't want to see it get mussed up with unnecessary new
"features".  Perhaps I'm just being too rigorous.

However, if my vote counts, I'm -1 all around - targets should be required
and target-less tasks should not be allowed.


> -----Original Message-----
> From: Patrick (Gus) Heck []
> Sent: Friday, July 19, 2002 11:23 AM
> To: Ant Developers List
> Subject: Re: [VOTE] target-less build files
> I already place all my setup stuff in an "init" task that 
> requires that
> the public-target task have been run to set a property... preventing
> command line invocation of targets that don't depend on both init and
> public. (or neither, but all tasks in my files depend on 
> "init"). Such a
> change would quite definately break my builds.
> -Gus
> Stefan Bodewig wrote:
> > 
> > On Thu, 18 Jul 2002, Stephane Bailliez <> wrote:
> > > but don't you think it would be better to have some sort 
> of reserved
> > > keyword for a target like "init" or whatever that will be 
> always be
> > > invoked at runtime before anything ?
> > 
> > And break old build files because you couldn't place <property>
> > outside of targets.
> > 
> > No magic names, please.  A new construct like <init> has been
> > discussed and vetoed before.
> > 
> > Stefan
> > 
> > --
> > To unsubscribe, e-mail:   
> <>
> > For additional commands, e-mail: 
> <>
> --
> To unsubscribe, e-mail:   
> <>
> For additional commands, e-mail: 
> <>

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

View raw message