ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scot P. Floess" <flo...@mindspring.com>
Subject Re: Neither dirset nor fileset with type selector seem to select directories
Date Wed, 10 May 2006 15:33:20 GMT
Holger:

Very odd indeed...I am looking at this and get back to you...but sure 
enough...dirset yields the file instead of the directories...

Holger Rauch wrote:
> 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
>   

-- 
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate  http://sourceforge.net/projects/jplate
Chief Architect JavaPIM http://sourceforge.net/projects/javapim


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


Mime
View raw message