退出ant目标而不失败构建
我正在寻找一种退出目标并继续运行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
<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>