ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <anto...@antbuild.com>
Subject AW: Fileset restrictions
Date Tue, 23 Sep 2003 11:46:11 GMT
You need to archive in your war 3 filesets

<fileset dir="a/b/c">
<include name="h/file1.xxx"/>
<include name="h/file2.yyy"/>
</fileset>
<fileset dir="d/e/c">
<include name="h/file3.xxx"/>
</fileset>
<fileset dir="f/g/c">
<include name="h/file5.xxx"/>
<include name="h/file6.yyy"/>
</fileset>

mappers are supported in the copy task, but I am not sure whether they are
supported in the war task.

Cheers,

Antoine

-----Urspr√ľngliche Nachricht-----
Von: Spencer Phil (KTXA 2) [mailto:phil.spencer@credit-suisse.com]
Gesendet: Dienstag, 23. September 2003 13:37
An: 'user@ant.apache.org'
Betreff: 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



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


Mime
View raw message