ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <anto...@antbuild.com>
Subject AW: AW: building war/ear/jar files with contents that are extracted from files
Date Sun, 19 Oct 2003 21:09:32 GMT
Hi,

ant has <gzip> and <gunzip> tasks, and also <tar/> and <untar/>.
You almost certainly have to <gunzip/> first the whole file.
Then <untar/> accepts nested patternset(s) and fileset(s) to let you specify
which files you want to extract.
But there is no type yet able to target specific tar entries directly from a
.tar.gz file.

Cheers,
Antoine

-----Ursprungliche Nachricht-----
Von: Hanasaki JiJi [mailto:hanasaki@hanaden.com]
Gesendet: Sonntag, 19. Oktober 2003 22:49
An: Ant Users List
Betreff: Re: AW: building war/ear/jar files with contents that are
extracted from files


Great! that is exactly what i was looking for.  Thanks!

Is there anyting like that to work on a tar.gz file?  zip is just for
winzip/gnuzip/jar/war/ear right?

Now the next step to figure out what to take out of the distrib files.
	ex: dom4j has a lib and a lib/tool dir
		the goal is to only take out the dom4j specific jars
		and get the rest, like jaxen, from the jaxen
		jaxen distribution but here is no way to separate
		them since they are all in the same directory
any advice?


Antoine Levy-Lambert wrote:
> Hi Hanasaki,
>
> yes, this is possible with a nested zipfileset.
>
> <war destfile="my.war">
> <zipfileset src="foo/bar/your.war">
> <include name="**/*.jar"/>
> </zipfileset>
> </war>
> this will copy into my.war the jars which are nested in foo/bar/your.war.
> The jars coming from your.war will have the same path inside my.war than
> in your.war
>
> <war destfile="my.war">
> <zipfileset src="foo/bar/your.war" prefix="lib">
> <include name="**/*.jar"/>
> </zipfileset>
> </war>
> this will copy into my.war the jars which are nested in foo/bar/your.war.
> The jars coming from your.war will have the path lib/path.in.your.war.
>
> (the lib nested element of the war task is actually a nested zipfileset).
>
>



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


Mime
View raw message