【发布时间】:2013-03-08 13:34:49
【问题描述】:
我有一个项目,其中包含许多测试用例,我使用 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.
【问题讨论】:
-
这个问题看起来与 maven 无关,而与我的计算机设置有关...
-
U:\>cmd.exe Microsoft Windows [版本 6.1.7601] 版权所有 (c) 2009 Microsoft Corporation。版权所有。系统找不到指定的路径。