ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Smith <>
Subject Expanding then flattening
Date Wed, 18 Jun 2003 20:19:10 GMT
Hi all,

I am trying to get files from a jar file and then flatten them into the same
directory.  Here is what I have so far:

  <fileset dir="${my.jcm.home}/jar" id="jcm.jar.jarfiles">
    <include name="struts-1.1-rc2.jar"/>
    <include name="struts-el-1.1-rc2.jar"/>
    <include name="standard-1.0.3.jar"/>
    <include name="jstl-1.0.3.jar"/>
    <include name="commons.digester-1.5.jar"/>

  <patternset id="jar.tldfiles">
    <include name="**/struts-html-el.tld" />
    <include name="**/struts-tiles.tld" />
    <include name="**/c.tld" />
    <include name="**/fmt.tld" />
  <unjar dest="web/WEB-INF/tld">
    <patternset refid="jar.tldfiles"/>
    <fileset refid="jcm.jar.jarfiles"/>

This will pull the tlds out of the jar files and put them into
web/WEB-INF/tld.  But it keeps the directory structure from the jar file.
For example, struts-tiles.tld ends up in
web/WEB-INF/tld/META-INF/tlds/struts-tiles.tld.  But I want all the files to
be in web/WEB-INF/tld.

I tried putting a <mapper type="flatten"/> after the <fileset> in the
<unjar>, but I am told "The <unwar> task doesn't support the nested "mapper"

I would like to avoid creating a temp directory if possible.

Anyone have any suggestions for me?

Thanks in advance,

Peter Smith
Software Engineer
InfoNow Corporation

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message