Ant: unzip multiple files

送分小仙女□ 提交于 2019-12-11 07:19:30

问题


How to unzip multiple files with Ant? I am using:

<unzip dest="./out">
    <patternset>
            <include name="**/*.zip"/>
    </patternset>
    <fileset dir="./in">
        <include name="**/*.zip"/>
    </fileset>
</unzip>

From the output it looks like ANT is correctly finding my files but nothing gets extracted:

[unzip] Expanding: c:\temp\in\test1.zip into c:\temp\out
[unzip] Expanding: c:\temp\in\test2.zip into c:\temp\out

BUILD SUCCESSFUL Total time: 0 seconds

I can't figure out what I am doing wrong.


回答1:


From the documentation

PatternSets are used to select files to extract from the archive. If no patternset is used, all files are extracted.

My guess is thus that your zip files don't contain any zip file, and thus nothing is extracted, since you told Ant to only extract zip files from your zip files.



来源:https://stackoverflow.com/questions/26241966/ant-unzip-multiple-files

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!