[英]Maven -DforkMode=never change user
When I run project, it uses one user (for example User1 ) that set in my runner class, but if I want to debug, and set -DforkMode=never
parameter, project runs with another user (for example User 3 ).当我运行项目时,它使用在我的 runner 类中设置的一个用户(例如User1 ),但是如果我想调试并设置-DforkMode=never
参数,项目将与另一个用户(例如User 3 )一起运行。 Can somebody explain this?有人可以解释一下吗?
You can use -X
as a maven option and it should print out the java command it runs to perform the tests, this might shed some light on the issue.您可以使用-X
作为 maven 选项,它应该打印出它运行以执行测试的 java 命令,这可能会说明问题。 Could you please post your full command for running your tests i believe -DforkMode=never
isnt a valid maven option past surefire v2.14
but if you add the configuration like so:您能否发布运行测试的完整命令,我相信-DforkMode=never
不是超过v2.14
的有效 maven 选项,但如果您添加如下配置:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<forkCount>0</forkCount>
</configuration>
</plugin>
For more information see http://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html有关更多信息,请参阅http://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.