ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: Fileset restrictions
Date Tue, 23 Sep 2003 11:42:37 GMT
The path used in pattern attribute is relative to the one in dir attribute.

The fileset support is done with a addFileset method (or something similar).
And
usually multiple fileset are supported. Maybe you can use multiple ...

Your first example seems to be the right one. And it includes the RIGHT
directories:
relative to dir. 
But I think a nested <mapper> can help here.
See in the manual CoreTypes/mapper.html


Jan


> -----Original Message-----
> From: Spencer Phil (KTXA 2) [mailto:phil.spencer@credit-suisse.com]
> Sent: Tuesday, September 23, 2003 1:37 PM
> To: 'user@ant.apache.org'
> Subject: Fileset restrictions
> 
> 
> I want to create a fileset that defines a bunch of files in parallel
> directories. e.g. given the directory structure
> 
> 	a/b/c/h/file1.xxx
> 	a/b/c/h/file2.yyy
> 	d/e/c/h/file3.xxx
> 	d/e/c/h/file4.yyy
> 	f/g/c/h/file5.xxx
> 	f/g/c/h/file6.yyy
> 
> I dynamically create the set of file patterns I want to create in
> a property ${patterns}
> 
> Now, operating in the directory f/g for example I want a fileset
> (in a war task for example) that includes the files
> 
> 	a/b/c/h/file1.xxx
> 	d/e/c/h/file4.yyy
> 	f/g/c/h/file5.xxx
> 	f/g/c/h/file6.yyy
> 
> with the relative directories
> 
> 	h/file1.xxx
> 	h/file4.yyy
> 	h/file5.xxx
> 	h/file6.yyy
> 
> The problem is that  if ${patterns}=a/b/**/*.xxx,d/e/**/*.yyy,f/g/**/*
> 
> 	<fileset dir="../.." includes="${patterns}"/>
> 
> produces the correct list of files with wrong relative directories
> 
> 	a/b/c/h/file1.xxx
> 	d/e/c/h/file4.yyy
> 	f/g/c/h/file5.xxx
> 	f/g/c/h/file6.yyy
> 
> and if 
> ${patterns}=../../a/b/**/*.xxx,../../d/e/**/*.yyy,../../f/g/**/*
> 
> 	<fileset dir="." includes="${patterns}"/>
> 
> produces nothing !! This seems to be a severe restriction on filesets.
> 
> I should emphasize, the content of ${patterns} is dynamically 
> created so I
> can't achieve what I want with a static list of filesets.
> 
> Am I missing some simple solution to this problem?
> 
> Phil
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message