Ant 解压缩任务 - 如何从提取的层次结构中排除存档名称? [英] Ant unzip task - how can I exclude the archive name from extracted hierarchy?

查看:35
本文介绍了Ant 解压缩任务 - 如何从提取的层次结构中排除存档名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在执行 ant 解压缩任务后从文件层次结构中排除存档名称?

How can I exclude the archive name from the file hierarchy after an ant unzip task?

例如,一旦 ant 在文件夹 C:\temp 中运行解压缩任务,我想要存档存档中的所有文件,但我得到 C:\temp\t\file.tmp.

For example, once ant's run the unzip task in the folder C:\temp, I want all the files from the archive archive, but instead I get C:\temp\t\file.tmp.

我可以有效地排除存档中的基本目录吗?

Can I effectively exclude the base directory inside the archive?

推荐答案

使用映射器指定文件在目标目录中的外观:

Use a mapper specify how the files should look in the destination directory:

<unzip src="t.zip" dest="temp">
    <globmapper from="t/*" to="*"/>
</unzip>

这篇关于Ant 解压缩任务 - 如何从提取的层次结构中排除存档名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆