ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Leonhardt" <leonha...@informatik.tu-darmstadt.de>
Subject Available task
Date Fri, 24 Aug 2001 13:20:17 GMT
Hi,
as I understand it the available task is only able to work with pathsets if
it's looking for a class. If it's looking for a file it's looking for the
absolut value.

I need to know if the file lexer.dat has been copied to the build directory.
To find out
I wanted to use the following construct.

  <path id="lexer.dat.path" >
      <fileset dir="${build.classes}" >
        <include name="**/java2/lexer/**"/>
      </fileset >
  </path >


  <target name="check_for_data_files">
    <available property="lexer.dat.present"
               file="lexer.dat"
               classpathref="lexer.dat.path" />
  </target >

Using ant -debug tells me that the patternset is build correctly. But the
available task
ignores it. I get the following.

check_for_data_files:
FileSet: Setup file scanner in dir d:\projects\Java\cktest\build\classes
with patternSet{ includes: [**/java2/lexer/**] excludes: [] }
[available] Unable to find d:\projects\Java\cktest\lexer.dat to set property
lexer.dat.present

In my understanding there shouldn't be much difference between a class file
and all other files, except for the extension.
So why doesn't the task handle them all the same?

Thanks,
Thomas



============================================================================
===
Thomas Leonhardt          email  leonhardt@informatik.tu-darmstadt.de
TU Darmstadt              WWW    http://www.pi.informatik.tu-darmstadt.de
FG Praktische Informatik  phone  +49 / (0)6151 / 16 - 5313
Wilhelminenstr. 7         fax    +49 / (0)6151 / 16 - 5472
D-64283 Darmstadt
Germany
============================================================================
===


Mime
View raw message