gpt4 book ai didi

java - 为什么我的 Ant 删除不起作用?

转载 作者:行者123 更新时间:2023-12-01 15:07:52 24 4
gpt4 key购买 nike

使用Ant 1.8.0

<target name="main">
<delete includeEmptyDirs="true">
<fileset dir="target/xxx/WEB-INF/lib" casesensitive="yes">
<filename name="junit-*.jar"/>
<filename name="gin-*.jar"/>
</fileset>
</delete>
</target>

当我运行这个 Ant 脚本时,没有任何反应,如果我只留下一个似乎它可以工作。我检查了 Ant 文件集类型,http://ant.apache.org/manual/Types/fileset.html ,看来两个没有关系。

谁能告诉我这里出了什么问题?

最佳答案

删除未成功,因为您的文件与您指定的文件名选择器不匹配。来自 the docs :

If any of the selectors within the FileSet do not select the file, the file is not considered part of the FileSet. This makes a FileSet equivalent to an <and> selector container.

关于java - 为什么我的 Ant 删除不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12738941/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com