运维开发网
广告位招商联系QQ:123077622
 
广告位招商联系QQ:123077622

ant删除任务给出错误

运维开发网 https://www.qedev.com 2020-05-09 12:15 出处:网络 作者:运维开发网整理
我想删除目录只有存在. <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\b
我想删除目录只有存在.

<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"/>

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

这样做的麻烦在于,如果目录确实存在,但由于某些其他原因无法删除,那么它仍然会继续进行.

扫码领视频副本.gif

0

精彩评论

暂无评论...
验证码 换一张
取 消