[英]Override Surefire configuration through command line
I think this is a simple problem for a Java DevOps.我认为这对于 Java DevOps 来说是一个简单的问题。 I have problems with the Surefire parameter which sets the number of test execution threads.
我对设置测试执行线程数的 Surefire 参数有疑问。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkCount>2.5C</forkCount>
<reuseForks>false</reuseForks>
</configuration>
</plugin>
I wish I could specify an override from the command line to set it to 1
.我希望我可以从命令行指定一个覆盖以将其设置为
1
。
You can find the goals of a plugin at the Goals page of every Maven plugin.您可以在每个 Maven 插件的目标页面上找到插件的目标。 If you select a specific goal there you see the goal's parameters and for the
surefire:test
goal there is:如果你 select 有一个特定的目标,你会看到目标的参数,并且对于
surefire:test
目标有:
<forkCount>
... User property is: [What a surprise;<forkCount>
...用户属性是: [多么惊喜; ;]forkCount
;]
forkCount
Hence:因此:
mvn ... -DforkCount=1 ...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.