ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morten Mortensen <morten.morten...@tietoenator.com>
Subject RE: Getting only Directories containing certain files.
Date Mon, 04 Aug 2003 08:26:59 GMT

Hi Steph & all,

I have done something like that. For the moment, I use it to find all
packages within my source-code directory, which contains "*.java". It is a
custom-task called "dir-list".

Example of usage (taken from inside a context):

  <target
    name="docInit"
    depends="external.slice.init"
  >
    <!-- Generate the list of packages: -->
    <dir-list
      source="${source.dir}"
      pattern="${javadoc.include}"
      targetFile="${javadoc.packageList.file}"
      fileSeparator="."
    />
    <!-- Read the list of packages: -->
    <loadfile
      property="javadoc.packageList"
      srcFile="${javadoc.packageList.file}"
    />
    <loadproperties
      srcFile="${java.version.file}"
    />
  </target>

ftp://yelstream.org./pub/Slice%20Extension%20Set%20for%20Apache%20Ant/latest
/Slice.v1.4.b369.Source.UnzipMe!.zip

There is a manual in there - try "Slice-User-Manual.pdf" inside
"Slice.v1.4.b369.Source.UnzipMe!.zip".

Regards,
  Morten Sabroe Mortensen


-----Original Message-----
From: Steph Richardson
To: user@ant.apache.org
Sent: 04-08-03 01:45
Subject: Getting only Directories containing certain files.


Hi,

I'm writing a target that iterates over a dirset, executing a certain
target one task at a time, and I'm trying to only iterate over
directories containing *.java files.

So the question is how to determine if a dir contains any files that fit
a certain pattern.
* I've tried building a dirset of only directories containing *.java -
but this doesn't seem to be possible.
* I've tried excluding empty dirs using the <available> task, but this
only seems to work if I am checking for an explicit filename,
not a wildcard.

Ideas plz ?

thanks,

Steph




--------------------------------------------------------
Steph Richardson
Kvasar Technology LLC
HQ: suite 106, 822 Boylston st., Chestnut Hill, MA 02467
smtp : steph@kvasar.com
http : www.kvasar.com
--------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message