简体   繁体   English

调用Ant时如何在Jenkins GUI中设置Java系统属性?

[英]How to set a Java system property in the Jenkins GUI when invoking Ant?

I have grouped my JUnit tests into several groups and I am only looking to run a single group in a given Jenkins job. 我已将我的JUnit测试分为几个组,而我只希望在给定的Jenkins工作中运行一个组。 To do this, I need to set the Dtestgroup system property to the name of that given test group. 为此,我需要将Dtestgroup系统属性设置为给定测试组的名称。

My question is how do I specify this in the Jenkins GUI. 我的问题是如何在Jenkins GUI中指定它。 I invoke Ant in order to build. 我调用Ant以进行构建。

I thought perhaps something like this would accomplish it, but I am not entirely sure. 我以为这样的事情也许可以实现,但我不确定。 Confirmation/guidance how to set it correctly would be very welcome. 确认/指导如何正确设置将非常受欢迎。

在此处输入图片说明

As the inline help for Properties says (click on the (?) icon next to the field), properties should be entered as name1=value1 . 正如属性的内联帮助所说(单击字段旁边的(?)图标),属性应输入为name1=value1

ie Remove the -D prefix from your property, and it will work as expected. 即从您的属性中删除-D前缀,它将按预期工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM