Hi!

I've created the following simple directory structure for testing purposes.
I would like to see only dirs below test ("blah" and "blubber") in my
dirset/fileset. The Ant version I'm using is 1.6.5 in conjunction with
JDK 1.5.0_06 on Linux:

test    (dir)
  |--> blah     (dir)
  |--> blubber  (dir)
  |--> hallo    (file)

I would like to select only directories, and this, according to the Ant
manual, is possible using either

- dirsets or
- filesets in conjunction with selectors

Given the following simple build file

----------------------------------------

<?xml version="1.0" encoding="iso-8859-1"?>

<project name="test" basedir="." default="pretest">

  <target name="pretest">
    <dirset id="all-dir" dir="test" />
    <property name="myprop" refid="all-dir" />
    <echo message="myprop = ${myprop}" />
  </target>

</project>

------------------------------------------

the output I get is:

============================

Buildfile: mytest.xml

pretest:
     [echo] myprop = hallo

BUILD SUCCESSFUL
Total time: 2 seconds

============================

When using a fileset in conjunction with selectors instead of the dirset,
like

<fileset id="all-dir" dir="test">
  <type type="dir" />
</fileset>

the output is

Buildfile: mytest.xml

pretest:
     [echo] myprop = 

BUILD SUCCESSFUL
Total time: 2 seconds

===> myprop is EMPTY!

Obvious question: Why do neither of those two methods yield the desired
result?

Thanks in advance for any info!

Kind regards,

        Holger

Attachment: signature.asc
Description: Digital signature

Reply via email to