ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Dimock <>
Subject Some Ant 1.0 ideas
Date Fri, 30 Jun 2000 19:59:14 GMT
I've been going over Arnout's Tasks spec, along with some of the other
comments, and want to throw out for discussion some possibilities.  I've
incorporated ideas from a lot of people - if I fail to give correct credit,
please forgive me.  A lot of them I remember seeing but have not been able
to find the original reference again.

Enhanced properties

Currently Ant only allows strings as properties.  There have been a number
of suggestions for enhanced properties, mostly variants on lists.

String properties - probably leave pretty much as is, any real changes here
will dramatically break backward compatability.  The ${} substitution
syntax is not terribly elegant, but it is servicible and already in a lot
of build files. Possible deprecate "name=" in favor of "id=" for
compatibility with the rest of these suggested property types, and to
reduce the number of ways "name" is used.

Pattern sets (suggested by Mark Brouwer, one of the few credits I was able
to find :P  )

  <patternset id="foo">
    <include name="**/*.java" />

  patternsets would be referenced via a patternset="foo" attribute.

File sets 

  <fileset id="foofiles" dir="bar">
    <include  ....   />
    <exclude ....    />

  <fileset id="foufiles" fileset="foo" />
  <fileset id="myfiles">
    <fileset dir="firstdir" />
    <fileset dir="src">
      <include name="*.java" />
  May be used without the id as nested tags.
Path sets

  Similar to above, but builds a path.  
  Carefull attention here to platform problems!

Task attributes

I tend to be a fan of relatively regular grammars, and it would seem to be
a good time to start using reasonably similar names across the various
tasks.  I personnaly like the idea of using a dotted notation, so that
rather than having srcdir and srcfile, we would have src.dir and src.file.
This can then be very easily extended to handle the enhanced property
types, such as src.fileset=

Some of the task now assume the "src" and "dest", I'd make them explicit.

  <jar src.fileset="foo" dest.file="foo.jar" />

  <jar dest.file="foo.jar">
    <src.fileset dir="klong">
      <include ...   />

  Not sure about that "src." in the second example.  Maybe not...

Sam Ruby's request to be able to have to output of one task be the input of
another could be handled like this:

<javac src.fileset="foo" dest.dir="build""outfoo" />
<jar src.fileset="outfoo" dest.file="foo.jar">

Well, that's it for now.  In one of my other lives I'm a pyrotechnician,
and this is the busy season.  Gotta go blow things up!!!
       Tom Dimock  ----  Cornell University  ----
"There go my people.  I must follow them, for I am their leader."  M. Gandhi

View raw message