Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
退出ant目标而不失败构建_Ant_Exit - Fatal编程技术网

退出ant目标而不失败构建

退出ant目标而不失败构建,ant,exit,Ant,Exit,我正在寻找一种退出目标并继续运行ant代码而不退出整个流程的方法。类似于下面的内容,但我有错误 <target name="foo"> <some-task/> <another-task/> <condition property="should.exit"> (condition check here....) </condition> <exit if="should.exit" message="some messag

我正在寻找一种退出目标并继续运行ant代码而不退出整个流程的方法。类似于下面的内容,但我有错误

<target name="foo">
<some-task/>
<another-task/>

<condition property="should.exit">
(condition check here....)
</condition>

<exit if="should.exit" message="some message"/>

(skipped tasks if "should.exit" is true)

</target>

(此处为条件检查…)
(如果“should.exit”为true,则跳过任务)
我得到的错误:

Problem: failed to create task or type exit   
[sshexec]      [echo] Cause: The name is undefined.   
[sshexec]    
[sshexec]      [echo] Action: Check the spelling.   
[sshexec]    
[sshexec]      [echo] Action: Check that any custom tasks/types have been declared.   
[sshexec]      [echo] Action: Check that any <presetdef>/<macrodef> declarations have taken place.   
[sshexec]    
[sshexec]      [echo]    [sshexec]    
[sshexec]      [echo]                    ERROR Error error
问题:创建任务或类型退出失败
[sshexec][echo]原因:名称未定义。
[sshexec]
[sshexec][echo]操作:检查拼写。
[sshexec]
[sshexec][echo]操作:检查是否已声明任何自定义任务/类型。
[sshexec][echo]操作:检查是否发生了任何/声明。
[sshexec]
[sshexec][echo][sshexec]
[sshexec][echo]错误

(此处为条件检查…)
(如果“should.exit”为true,则跳过任务)

请检查特定任务是否支持
failonerror
属性。
<target name="foo">
<some-task/>
<another-task/>

<condition property="should.exit">
(condition check here....)
</condition>

<fail message="failing">
    <condition>
        <equals arg1="${should.exit}" arg2="true"/>
    </condition>
</fail>

(skipped tasks if "should.exit" is true)

</target>