ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <>
Subject The Elements of Ant Style
Date Fri, 19 Apr 2002 00:22:28 GMT
The Ant book that I'm co-authoring is entering its last phase of development
and we would like to involve the entire Ant community in our efforts. The
primary reason for doing this is because its fun and gives folks an
opportunity to be a part of something we feel is very special.

One of our Appendices is titled "The Elements of Ant Style" in honor of my
most favorite Java book of all time, "The Elements of Java Style". We want
to make our Ant version similar in that it will be an organized collection
of Ant words of wisdom and little gems of advice to make our build file
writing that much better and elegant.  Here is an example:

- Build paths up from previously defined properties rather than directly.

Don't do this:
  <property name="build.dir" location="build"/>
  <property name="build.classes" location="build/classes"/>

Do this instead:
  <property name="build.dir" location="build"/>
  <property name="build.classes" location="${build.dir}/classes"/>

Which would be followed by a brief explanation of why, which in this case is
so that you can override the value of build.dir and it will in turn affect
all subordinate mappings (and of course the subordinate mappings could be
reassigned individually if desired too in either case).

Here's what we are asking: Submit your gems of Ant wisdom (they should be
short and sweet, for the most part) to or
reply on the ant-user list. We will use our discretion for which entries are
accepted, and there are no promises that entries submitted will be used. If
you would NOT like your name attributed to the entry, please state this in
your submission, otherwise we will give you the attribution (name only, not
e-mail address) - be sure the name you want attributed is in your e-mail
header or stated in the text of your mail. The first to submit a particula
item (as there is likely to be duplication) wins.

The publisher posts complete sample chapters on their website, and we will
push to have this Appendix be one of them so that it is freely available to
the community - no promises as that is not within my direct control though.

    Erik Hatcher
    Steve Loughran

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

View raw message