You can probably do what you want using a mappedresources
resource collection. This 'worked for me' in a basic test (one input war called test1.war
):
<mappedresources id="mapped.zfs"> <zipfileset dir="${basedir}/test/target"> <include name="test*.war"/> </zipfileset> <globmapper from="test*" to="webapps/sample*" /> </mappedresources> <zip destfile="eg.zip"> <resources refid="mapped.zfs" /> </zip> % unzip -l eg.zip Archive: eg.zip Length Date Time Name --------- ---------- ----- ---- 0 11-27-2012 00:19 webapps/ 1423 11-27-2012 00:16 webapps/sample1.war --------- ------- 1423 2 files
Read full article from Ant zipfileset rename file - Stack Overflow
No comments:
Post a Comment