ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Martin <antu...@gmail.com>
Subject using compositemappers with zip
Date Tue, 20 Apr 2010 15:50:35 GMT
Hello,

Is it possible to use compositemappers with zip?

The idea is to have a source tree templatized like
@dirname@/file1

and to obtain the following in the zip file (in one go):
dir1/file1
dir2/file1

I imagined this could be done like this:
<zip destfile="test/data/destzip.zip">
  <mappedresources>
    <fileset dir="test/data/srcdir" includes="**" />
    <compositemapper>
      <filtermapper>
        <replacestring from="@dirname@" to="dir1"/>
      </filtermapper>
      <filtermapper>
        <replacestring from="@dirname@" to="dir2"/>
      </filtermapper>
    </compositemapper>
  </mappedresources>
</zip>

but I only obtained 1 file in the zip:
/dir1/file1

Would you have any idea?
The same idea would work in <copy>, using the attribute
"enablemultiplemappings".

Thanks,

Patrick

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


Mime
View raw message