简体   繁体   English

Jenkins 在构建作业时出现 maven 错误

[英]Jenkins maven error while building job

I am running the following maven command from my jenkins box -我正在从我的 jenkins 框中运行以下 maven 命令 -

+ /temp/app/tools/apache-maven-3.0.4/bin/mvn --update-snapshots clean deploy

But this is throwing the following error -但这会引发以下错误-

Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher

Any clue why I am getting this error?任何线索为什么我会收到此错误? The maven installation seems OK (as I have triggered mvn command directly from the Linux server). maven 安装似乎没问题(因为我直接从 Linux 服务器触发了 mvn 命令)。

Check your maven installation.检查您的 Maven 安装。 The version must match and set your Maven_Home or M3_HOME variable版本必须匹配并设置您的 Maven_Home 或 M3_HOME 变量

I edited the .bashrc file to set the Maven home, sourced it and then restarted the Jenkins server.我编辑了.bashrc文件来设置 Maven 主页,找到它然后重新启动 Jenkins 服务器。 That seemed to solve my issue.这似乎解决了我的问题。

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

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