ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Spencer Phil (KTXA 2)" <phil.spen...@credit-suisse.com>
Subject RE: Fileset restrictions
Date Tue, 23 Sep 2003 14:03:16 GMT
Thanks Kieth,

Whilst looking at the <zipfileset> you suggested, I discovered the <zipgroupfileset>.

I solved my problem by creating a zip file for each pattern. So in my example I have

	a/b/c/h/file1.xxx
	a/b/c/h/file2.yyy
	a/b/ab.zip      >> h/file1.xxx
	d/e/c/h/file3.xxx
	d/e/c/h/file4.yyy
	d/e/de.zip      >> h/file4.yyy
	f/g/c/h/file5.xxx
	f/g/c/h/file6.yyy
	f/g/fg.zip      >> h/file5.xxx, h/file6.xxx

(>> = "dynamically created, containing: " )

And 

	${patterns}=a/b/ab.zip,d/c/de.zip,f/g/fg.zip

Now I can use

	<zipgroupfileset dir="../.." includes="${patterns}"/>

As it happens, this turns out to be an extremely simple and elegant solution in my environment.

Thanks again to you and to all who responded

Phil

-----Original Message-----
From: Keith Hatton [mailto:khatton@axiomsystems.com]
Sent: Tuesday, September 23, 2003 1:42 PM
To: Ant Users List
Subject: RE: Fileset restrictions


Hi Phil,

You might take a look at <zipfileset>, in particular its prefix attribute. I often use
this for tinkering with relative paths in an archive. But I don't know whether it will do
exactly what you want in this case. You may have to experiment with the definition of the
patternsets.

Hope this helps
Keith


-----Original Message-----
From: Spencer Phil (KTXA 2) [mailto:phil.spencer@credit-suisse.com]
Sent: 23 September 2003 12:37
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


---------------------------------------------------------------------
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