jenkins 无法编译maven 项目

开源中国首席 发布于 2017/07/19 11:40
阅读 1K+
收藏 0
[lj_cs] $ cmd.exe /C "mvn && exit %%ERRORLEVEL%%"
The system cannot find the file specified
FATAL: command execution failed
java.io.IOException: Cannot run program "cmd.exe" (in directory "C:\Users\Administrator\.jenkins\workspace\lj_cs"): CreateProcess error=2, ?????????
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
	at hudson.Proc$LocalProc.<init>(Proc.java:243)
	at hudson.Proc$LocalProc.<init>(Proc.java:212)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:833)
	at hudson.Launcher$ProcStarter.start(Launcher.java:383)
	at hudson.Launcher$ProcStarter.join(Launcher.java:394)
	at hudson.tasks.Maven.perform(Maven.java:363)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:944)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:682)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
	at hudson.model.Run.execute(Run.java:1728)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:542)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:404)
Caused by: java.io.IOException: CreateProcess error=2, ?????????
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(ProcessImpl.java:376)
	at java.lang.ProcessImpl.start(ProcessImpl.java:136)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
	... 15 more
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE
加载中
0
开源中国首席

请教各位大神如何解决呢,maven环境变量是有的

返回顶部
顶部