gpt4 book ai didi

Ant 删除任务出错

转载 作者:行者123 更新时间:2023-12-01 01:28:46 25 4
gpt4 key购买 nike

我只想删除目录,如果存在。

 <target name="clean">
<delete dir="${COMP_BUILD}" />
</target>

这得到错误
clean:
[delete] Deleting directory U:\id824275_03_2011_06_JUN_ESW\CCS_WSC_ECM\ecm_esw\app\ENT_APP\ESW\bgc-esw-services\build

BUILD FAILED
U:\id824275_03_2011_06_JUN_ESW\CCS_WSC_ECM\ecm_esw\app\BUILD\ESW\ESWBUILD\build.xml:451: The following error occurred while executing this line:
U:\id824275_03_2011_06_JUN_ESW\CCS_WSC_ECM\ecm_esw\app\ENT_APP\ESW\bgc-esw-web\build.xml:207: The following error occurred while executing this line:
U:\id824275_03_2011_06_JUN_ESW\CCS_WSC_ECM\ecm_esw\app\ENT_APP\ESW\bgc-esw-web\build.xml:84: The following error occurred while executing this line:
U:\id824275_03_2011_06_JUN_ESW\CCS_WSC_ECM\ecm_esw\app\ENT_APP\ESW\bgc-esw-services\build.xml:64: Unable to delete directory U:\id824275_03_2011_06_JUN_ESW\CCS_WSC_ECM\ecm_esw\app\ENT_APP\ESW\bgc-esw-services\build\lib

最佳答案

您可以指定 failonerror :

<delete dir="${COMP_BUILD}" failonerror="false"/>

如果目录不存在,这将继续执行。

这样做的问题是,如果目录确实存在,但由于其他原因无法删除,那么它也会继续存在。

关于 Ant 删除任务出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6075107/

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