简体   繁体   English

从詹金斯工作运行声纳时,Maven错误

[英]maven error while running sonar from jenkins job

I am trying to implement Sonar in Jenkins CI using maven build tool.I am using Linux machine to build maven with Sonar. 我正在尝试使用maven构建工具在Jenkins CI中实现Sonar。我正在使用Linux机器与Sonar构建maven。 maven is successfully installed. maven已成功安装。 I have tried to configure maven path in Jenkins Configuration, maven is installed . 我尝试在Jenkins Configuration中配置maven路径,安装了maven。 whenever I run the job getting below error. 每当我运行作业时出现错误以下。

java.io.IOException: Cannot run program "mvn" (in directory \\"/directorypath"): java.io.IOException: error=2, No such file or directory"" java.io.IOException:无法运行程序“ mvn”(在目录\\“ / directorypath”中):java.io.IOException:error = 2,没有这样的文件或目录“”

as I understood from error that its unable to find out maven in Job directory. 正如我从错误中了解到的那样,它无法在Job目录中找到Maven。 what configuration should needed so job can take by default maven path where is installed. 应该需要什么配置,以便作业可以默认采用安装路径。

I have searched lot on internet, but could not helped. 我在互联网上搜索了很多内容,但没有帮助。

Try without mvn in the commands 尝试在命令中不使用mvn

Eg clean install package 例如干净的安装包

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

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