[英]Jenkins build error FATAL: Couldn’t find any executable in C:\apache-maven-3.5.0\bin
I started using Jenkins 2.73.1 on Windows 7. I also have Apache Maven 3.5.0 installed at C:\\apache-maven-3.5.0\\bin. 我开始在Windows 7上使用Jenkins 2.73.1。我还在C:\\ apache-maven-3.5.0 \\ bin下安装了Apache Maven 3.5.0。 In Manage Jenkins -> Global Tool Configuration, I defined the maven installation. 在Manage Jenkins-> Global Tool Configuration中,我定义了maven安装。
I defined MAVEN_HOME as C:\\apache-maven-3.5.0\\bin, but it gives me a warning message "C:\\apache-maven-3.5.0\\bin doesn't look like a Maven directory". 我将MAVEN_HOME定义为C:\\ apache-maven-3.5.0 \\ bin,但它给我一条警告消息“ C:\\ apache-maven-3.5.0 \\ bin看起来不像Maven目录”。
I leave the setting as is because that is the correct maven install directory. 我将设置保持不变,因为那是正确的maven安装目录。 Should the path be something else? 路径应该是其他东西吗?
I proceed with the project build and I get this error. 我继续进行项目构建,但出现此错误。
FATAL: Couldn't find any executable in C:\\apache-maven-3.5.0\\bin Build step 'Invoke top-level Maven targets' marked build as failure Finished: FAILURE 严重:在C:\\ apache-maven-3.5.0 \\ bin中找不到任何可执行文件。生成步骤“调用顶层Maven目标”标记为生成失败完成:失败
What doesn't make sense is that I believe I have the correctly configured the Maven install so I don't know why I get the warning message and the error. 没有任何意义的是,我相信我已经正确配置了Maven安装,因此我不知道为什么会收到警告消息和错误。
After searching online some seems to indicate that it is looking for mvn.cmd or mvn.bat so I made a copy to have both files in the directory but doesn't work for me. 在网上搜索后,似乎有些迹象表明它正在寻找mvn.cmd或mvn.bat,因此我进行了复制以将两个文件都放在目录中,但对我不起作用。
I found my answer. 我找到了答案。
I defined MAVEN_HOME as C:\\apache-maven-3.5.0\\bin, but it should be MAVEN_HOME as C:\\apache-maven-3.5.0. 我将MAVEN_HOME定义为C:\\ apache-maven-3.5.0 \\ bin,但应将MAVEN_HOME定义为C:\\ apache-maven-3.5.0。
This worked for me. 这对我有用。
ikask 伊卡斯克
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.