ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Kelly" <>
Subject Nesting <target>
Date Thu, 01 Nov 2001 15:24:16 GMT
Ant People:

(If this is something you've discussed already, forgive
my redundance.)

Something that's bugged me about Ant's <target> is the
depends attribute:

  <target name="all"
    depends="all.prep,, all.archive">
  <target name="all.prep">
  <target name="">

To me, that seems too awfully make-esque:

  all: all.prep all.archive

Editing, organizing, and debugging an Ant build.xml file
with lots of dependencies can get tricky.  How about
leveraging the fact that this is XML and elements nest:

  <target name="all">
    <target name="prep">
    <target name="build">
    <target name="archive">

Now, indentation can be used to tell where you are in
what.  Heck, you could even generate nested task names
(all.prep, all.prep.stamp, all.prep.dirs, ...) to allow
the developer to specify precise substeps to run, or to
have foreign depend attributes refer to internal
targets.  I'll leave the scoping issues to you.

(Just a thought.)

Sean Kelly
Independent Consultant

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

View raw message