English 中文(简体)
ant删除任务出错
原标题:ant delete task gives error
  • 时间:2011-05-20 16:45:05
  •  标签:
  • ant

我只想删除存在的目录。

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

这会出错

clean:
   [delete] Deleting directory U:id824275_03_2011_06_JUN_ESWCCS_WSC_ECMecm_eswappENT_APPESWgc-esw-servicesuild

BUILD FAILED
U:id824275_03_2011_06_JUN_ESWCCS_WSC_ECMecm_eswappBUILDESWESWBUILDuild.xml:451: The following error occurred while executing this line:
U:id824275_03_2011_06_JUN_ESWCCS_WSC_ECMecm_eswappENT_APPESWgc-esw-webuild.xml:207: The following error occurred while executing this line:
U:id824275_03_2011_06_JUN_ESWCCS_WSC_ECMecm_eswappENT_APPESWgc-esw-webuild.xml:84: The following error occurred while executing this line:
U:id824275_03_2011_06_JUN_ESWCCS_WSC_ECMecm_eswappENT_APPESWgc-esw-servicesuild.xml:64: Unable to delete directory U:id824275_03_2011_06_JUN_ESWCCS_WSC_ECMecm_eswappENT_APPESWgc-esw-servicesuildlib
最佳回答

您可以指定<code>failoneror</code>:

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

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

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

问题回答

暂无回答




相关问题
i want to continously run my java threads

I am running my java application where i have used threads... i am running this application using ant command on the terminal.. But when i close my terminal or press ctrl+c,then java program which was ...

Subant targets instead of ant

I m having a problem with subant and have no ideas any more. Can anyone help? Using Ant to replace some strings for other (i.e Productname and Version for "Foo" and "1.2") I used ...

java ant buildfile for project with dependencies

I am new to ant, but am trying to create an ant script that builds my current proeject with another project as a dependency. I have the ant script building my current project, but am unsure how to add ...

Building Apache Hive - impossible to resolve dependencies

I am trying out the Apache Hive as per http://wiki.apache.org/hadoop/Hive/GettingStarted and am getting this error from Ivy: Downloaded file size doesn t match expected Content Length for http://...

Ivy, ant and start scripts

I have a project that uses ant to build and ivy for dependencies. I would like to generate the start scripts for my project, with the classpath, based on the dependencies configured in Ivy, ...

热门标签