Ant:解压多个文件
如何使用Ant解压多个文件? 我正在使用:Ant:解压多个文件,ant,unzip,Ant,Unzip,如何使用Ant解压多个文件? 我正在使用: <unzip dest="./out"> <patternset> <include name="**/*.zip"/> </patternset> <fileset dir="./in"> <include name="**/*.zip"/> </fileset> </unzip>
<unzip dest="./out">
<patternset>
<include name="**/*.zip"/>
</patternset>
<fileset dir="./in">
<include name="**/*.zip"/>
</fileset>
</unzip>
生成成功的总时间:0秒
我不知道我做错了什么 来自
模式集用于选择要从存档中提取的文件。如果未使用任何图案集,将提取所有文件
我的猜测是,您的zip文件不包含任何zip文件,因此不会提取任何内容,因为您告诉Ant只从zip文件中提取zip文件。您是否检查了./out目录?在./in目录中有zip文件吗?在我的目录中有test1.zip和test2.zip。我想让蚂蚁把它们里面的所有东西都提取出来,然后保存起来,这样你就看不到我的答案了吗?为什么要使用图案集?您正在使用的模式集对Ant说:“我只想从zip文件中提取名为*.zip的文件,其他文件不应该被提取。”。删除这个模式集。我想我刚刚发现了,当然是根据你的评论。我认为patternset是选择要解压缩的文件,而不是从zip文件中解压缩的文件。谢谢我一移除patternset,它就工作了:
[unzip] Expanding: c:\temp\in\test1.zip into c:\temp\out
[unzip] Expanding: c:\temp\in\test2.zip into c:\temp\out