小编Gos*_*sia的帖子

停止ant脚本而不会失败构建

在我的ant脚本中,我想在满足条件时退出(停止执行构建)而不会失败.我试过用:

<if>
    <equals arg1="${variable1}" arg2="${variable2}" />
  <then>
    <fail status="0" message="No change, exit" />
  </then>
</if>
Run Code Online (Sandbox Code Playgroud)

Ant脚本在条件下停止,但构建失败.我希望停止构建但没有错误.我在Jenkins中使用"Invoke Ant"步骤.

谢谢.

ant build ant-contrib

8
推荐指数
2
解决办法
1万
查看次数

标签 统计

ant ×1

ant-contrib ×1

build ×1