ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <>
Subject Re: can filesets be stored in a properties file?
Date Fri, 08 Jun 2007 18:02:56 GMT

--- caleysoldman <> wrote:

> hi matt, thanks for your you are ant
> folx:
> my requirement is to produce sql using ant. i am
> enjoined not to use
> velocity, groovy, or anything but ant. 
> as such, what i am trying to replicate is shell
> script logic because those
> are my marching orders. i mention this because i'm
> sure real application
> developers will object to this egregious misuse of
> ant... 
Thanks for clarifying all that up front.  :)

> :arguing:
> regardless, what i did was create a working build
> ...all i really need to
> understand is how to move the fileset to an external
> file that will then be
> used based on the DBMS property which value is
> passed at the command line.
> thanks in advance for your help ant folx!

If you know that you only have a finite number of
filesets, here typicalTableSQL and typicalTabStorage,
it shouldn't be too difficult.  You should be able to
add some properties to or another
properties file to handle what you need.  Here's what
I would probably do:

#new file e.g. "":

Then add to your buildfile, after you've loaded

<property file="" />
<macrodef name="createFileset">
  <attribute name="assignid" />
    <!-- default includes and excludes -->
    <property name="@{assignid}.includes" value="**/*"
    <property name="@{assignid}.excludes" value="" />
    <fileset id="@{assignid}" dir="${@{assignid}.dir}"
                 excludes="${@{assignid}.excludes}" />

<createFileset assignid="typicalTableSQL" />
<createFileset assignid="typicalTabStorage" />

... finally, of course, remove your old fileset

Good luck,


Get the Yahoo! toolbar and be alerted to new email wherever you're surfing.

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

View raw message