简体   繁体   English

Jenkins 工作不使用已安装的 Maven

[英]Jenkins job not using installed maven

I'm having an issue with running a test suite through Jenkins and I can't figure out why it's failing.我在通过 Jenkins 运行测试套件时遇到问题,我不知道为什么它会失败。

My job is set up with maven and according to others, maven is set up on the jenkins server (I don't have permission to check myself).我的工作是用 maven 设置的,据其他人说,maven 是在 jenkins 服务器上设置的(我无权检查自己)。 The job is set to run on a specific node using labels (can't check the settings on the labels myself either).该作业设置为使用标签在特定节点上运行(也无法自己检查标签上的设置)。

This is the error I get when I run (more or less).这是我运行时遇到的错误(或多或少)。

Running as SYSTEM
Installer "Extract *.zip/*.tar.gz" cannot be used to install "mvn.3.5.2" on the node "SELECTEDNODE"
[EnvInject] - Loading node environment variables.
Building remotely on SELECTEDNODE in workspace E:...
Installer "Extract *.zip/*.tar.gz" cannot be used to install "mvn.3.5.2" on the node "SELECTEDNODE"
using credential ABCD
Installer "Extract *.zip/*.tar.gz" cannot be used to install "mvn.3.5.2" on the node "SELECTEDNODE"
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
...
...
Installer "Extract *.zip/*.tar.gz" cannot be used to install "mvn.3.5.2" on the node "SELECTEDNODE"
Installer "Extract *.zip/*.tar.gz" cannot be used to install "mvn.3.5.2" on the node "SELECTEDNODE"
ERROR: Maven Home null doesnt exist
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in 0 seconds
Finished: FAILURE

This message keeps repeating Installer "Extract *.zip/*.tar.gz" cannot be used to install "mvn.3.5.2" on the node "SELECTEDNODE" even though I have this version of maven installed on the selected node (I do not know if this version is on the Jenkins server, just that a maven version is on the server. I am assuming it is the correct version as I mentioned it needed to be this version and have not heard otherwise).此消息不断重复Installer "Extract *.zip/*.tar.gz" cannot be used to install "mvn.3.5.2" on the node "SELECTEDNODE"即使我有这个版本的Maven的安装选择的节点上(我不知道这个版本是否在 Jenkins 服务器上,只是服务器上有一个 Maven 版本。我假设它是正确的版本,因为我提到它需要是这个版本并且没有听说过其他版本)。 Is this what is causing the issue?这是导致问题的原因吗?

There are usually 2 ways to get maven installed for you build.通常有两种方法可以为您构建安装 maven。 One is on the node server itself and define that maven path in the jenkins node configuration and the other way is to have the maven automatically installed from internet which appears to be the case in your case..when you have multiple maven defined you need to specifically select the maven for your job.一个是在节点服务器本身上,并在 jenkins 节点配置中定义该 maven 路径,另一种方法是从 Internet 自动安装 maven,这在您的情况下似乎是这种情况……当您定义了多个 maven 时,您需要专门为您的工作选择 Maven。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM