嗨,我是这个区域的新手,我做了很多工作,无法解决这个问题
我整合了我存储在git hub中的selenium项目,我想从localhost jenkins安排它
首先我写了一个示例maven项目并推送到git我正在配置jenkins从git hub获取它并在本地机器上构建
但是我收到以下错误
Started by user anonymous
Building in workspace C:\Program Files (x86)\Jenkins\jobs\GitJenkinsDemo\workspace
> git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git.exe config remote.origin.url https://github.com/chaitanyap97/Gittest.git # timeout=10
Fetching upstream changes from https://github.com/chaitanyap97/Gittest.git
> git.exe --version # timeout=10
> git.exe -c core.askpass=true fetch --tags --progress https://github.com/chaitanyap97/Gittest.git +refs/heads/*:refs/remotes/origin/*
> git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10
> git.exe rev-parse "refs/remotes/origin/origin/master^{commit}" # timeout=10
Checking out Revision 0ccaf41f5ad97bf665f39b43093f4d94863f824a (refs/remotes/origin/master)
> git.exe config core.sparsecheckout # timeout=10
> git.exe checkout -f 0ccaf41f5ad97bf665f39b43093f4d94863f824a
First time build. Skipping changelog.
[workspace] $ cmd.exe /C '"mvn.bat -f GitTestDemo/pom.xml mvn test && exit %%ERRORLEVEL%%"'
'mvn.bat' is not recognized as an internal or external command,
operable program or batch file.
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE
Configurations are:
JAVA_HOME:C:\Program Files\Java\jdk1.7.0_79
M2_HOME:C:\Program Files\apache-maven-3.3.3
PATH:C:\Program Files\apache-maven-3.2.3\bin;%JAVA_HOME%\bin;C:\Program Files (x86)\Git\cmd
Or
PATH:%M2_HOME%\bin;%JAVA_HOME%\bin;C:\Program Files (x86)\Git\cmd
请帮忙,
感谢。
答案 0 :(得分:0)
这是因为在Maven 3.3.1中,mvn.bat
文件被替换为mvn.cmd
。请参阅Bug 251213 - new maven command line extension for windows change from .bat to .cmd。
因此,请相应地将mvn.bat
更改为mvn.cmd
。