使用“如果"apache ant脚本中junit元素内的条件 [英] Using "if" condition inside junit element in apache ant script

查看:23
本文介绍了使用“如果"apache ant脚本中junit元素内的条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在 build.xml 文件的 junit 元素中使用if-then-else"条件,但在尝试构建时出现以下错误.

I have tried to use "if-then-else" condition inside junit element in a build.xml file and I am getting the following error while trying to build.

junit 不支持嵌套的if"元素

是否有解决此问题的方法?

Is there a work around for this issue?

推荐答案

自 Ant 1.9.1 本周发布以来,您可以放置​​ ifunless 属性在任意 Ant 任务上.

Since Ant 1.9.1 which has been released this week, you can put if and unless attributes on arbitrary Ant tasks.

参见 http://ant.apache.org/manual/ifunless.html

这篇关于使用“如果"apache ant脚本中junit元素内的条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆