我有一个包含许多测试用例的项目,我使用 Maven surefire 插件 2.13 对其进行编译。当我设置forkmode = none
一切正常时,但是当我省略该条目时,默认值forkmode
变为once
并且我的项目失败:
Forking command line: cmd.exe /X /C ""C:\Program Files\Java\jdk1.6.0_37\jre\bin\java" -jar G:\Gottware-server\core\math\target\surefire\surefirebooter
7758025909061587587.jar G:\Gottware-server\core\math\target\surefire\surefire8735550212668630533tmp G:\Gottware-server\core\math\target\surefire\suref
ire_08386349728753606434tmp"
The system cannot find the path specified.
看起来这是一个操作系统问题,我使用的是 Windows 7。可能出了什么问题?很好奇的是,在成功构建之后,我也遇到了同样的错误:
[INFO] -----------------------------------------------
[INFO] BUILD SUCCESS
[INFO] -----------------------------------------------
[INFO] Total time: 15.504s
[INFO] Finished at: Fri Mar 08 15:08:54 CET 2013
[INFO] Final Memory: 13M/353M
[INFO] -----------------------------------------------
The system cannot find the path specified.
事实上,我已经调试了我的 mvn.bat maven 的最后一行
cmd /C exit /B %ERROR_CODE%
这根本不再起作用返回:
The system cannot find the path specified.
我进一步调试:
U:\>cmd.exe
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
The system cannot find the path specified.