ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Morten S. Mortensen" <>
Subject RE: Target Aliases?
Date Tue, 20 Jan 2004 08:43:59 GMT

It is not a bad idea!!

I have begun putting a "namespace" upon target-names - like "project:build", "project:clean",
"project:all" and "util:mbmon", "util:wol". I also use "private:" on all targets not meant
to be invoked from the outside - targets kind of miss a scope, but that is something different
than the namespace.

Internally, I link all targets with e.g. the "project:"-prefix. However, I define an "alias"-target
for the long targets - e.g. a "build"-target which depends upon the "project:build" target.

The "project:build" carries the target-description, while the short "build" does not. The
first gets printed when using "ant -p".

IT WOULD BE NICE to allow targets to have multiple names!!! It would also be nice to allow
empty depends-attributes, since this simplifies editing - and it would be nice to skip the
depends-comma-list in favour of something more structured like using entities instead of a
*list*-attribute, since the first can be handled in a more generic way when programmatically
manipulating files:

    <!-- Compile the lot: -->
    <!-- Build the main archive: -->
    <!-- Construct the static runtime environment: -->



It would also become more natural to put comments upon Ant-statements.
Yes, I know, that Ant is somewhat targeted agains manual writing - hence e.g. the depends-list
as it has always been.

  Morten Sabroe Mortensen

-----Original Message-----
From: Matt Raible []
Sent: 16. januar 2004 21:26
Subject: Target Aliases?

I haven't done any research on this, but I thought this would be a nice 
feature in Ant.  It'd be cool to be able to specify target aliases.  
For instance, in my webapp (based largely on examples from Java Dev 
with Ant), I have a number of targets for compiling - compile-common, 
compile-ejb, compile-web.  If a user wants to compile everything, they 
have to type "ant compile-web" - where most Ant users are probably used 
to typing "ant compile".  Rather than creating a new target that 
depends on, or calls upon, "compile-web", I'd just like to give this 
target an alias.  For example <target="compile-web" depends="webdoclet" 
alias="compile">.  Whaddya think?  Is this a stupid feature request?



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

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

View raw message