问题
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