在maven-surefire-plugin中附加argLine参数的值

在maven-surefire-plugin中附加argLine参数的值,第1张

在maven-surefire-plugin中附加argLine参数的值

官方文件称该更换较晚。

如果执行以下 *** 作,则将覆盖

argLine
之前由其他插件设置的参数值,因此 请勿 这样做

<plugin>    <groupId>org.apache.maven.plugins</groupId>    <artifactId>maven-surefire-plugin</artifactId>    <configuration>        <argLine>-D... -D...</argLine>    </configuration></plugin>

保留现有值并添加配置的正确方法是使用

@{...}
语法

<plugin>    <groupId>org.apache.maven.plugins</groupId>    <artifactId>maven-surefire-plugin</artifactId>    <configuration>        <argLine>@{argLine} -D... -D...</argLine>    </configuration></plugin>

或者您可以在文件

argLine
中将其设置为:
property``pom.xml

<properties>    <argLine>-DCRR.Webservice.isSimulated=true -D...</argLine></properties>

以上两种解决方案均能正常工作。



欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5501445.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-12-13
下一篇2022-12-12

发表评论

登录后才能评论

评论列表(0条)

    保存