退出蚂蚁目标而不失败构建
Exiting ant target without failing build
我正在寻找一种方法来退出目标并继续 运行 蚂蚁代码而不退出整个过程。类似下面的内容,但我收到错误。
<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>
我得到的错误:
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
<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>
我正在寻找一种方法来退出目标并继续 运行 蚂蚁代码而不退出整个过程。类似下面的内容,但我收到错误。
<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>
我得到的错误:
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
<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>