我有这个蚂蚁代码,但我想用antBuilder将它写成grails:
<zip destfile="${dist}/manual.zip">
<zipfileset dir="htdocs/manual" prefix="docs/user-guide"/>
<zipfileset dir="." includes="ChangeLog27.txt"fullpath="docs/ChangeLog.txt"/>
<zipfileset src="examples.zip" includes="**/*.html" prefix="docs/examples"/>
</zip>
答案 0 :(得分:0)
这对我有用
new AntBuilder()。zip(destFile:“$ {dist} /manual.zip”){
zipfileset( dir:"htdocs/manual", includes: "${measureId}.xml", prefix: "docs/user-guide" )
zipfileset( dir: "." , includes: "ChangeLog27.txt" ,fullpath: "docs/ChangeLog.txt" )
zipfileset(src: "examples.zip",includes:"**/*.html",prefix:"docs/examples")
}