Hudson post 使用 Sonar 插件的构建操作失败

Hudson post build action with Sonar plugin failed

我尝试 运行 一个 Hudson (3.3.3) post build action with the Sonar plugin (2.0.1) in a free-style project,但我得到一个错误。

作业日志:

[workspace] $ mvn -f /home/hudson/.hudson333/jobs/Test/workspace/pom.xml -e -B sonar:sonar -Dsonar.jdbc.driver=org.postgresql.Driver -Dsonar.jdbc.url=jdbc:postgresql://sonar/sonar4 ******** ******** -Dsonar.host.url=http://sonar.mycompany.com
FATAL: command execution failed
java.io.IOException: Cannot run program "mvn" (in directory "/home/hudson/.hudson333/jobs/Test/workspace"): error=13, Permission denied
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
    at hudson.Proc$LocalProc.<init>(Proc.java:187)
    at hudson.Proc$LocalProc.<init>(Proc.java:157)
    at hudson.Launcher$LocalLauncher.launch(Launcher.java:649)
    at hudson.Launcher$ProcStarter.start(Launcher.java:266)
    at hudson.Launcher$ProcStarter.join(Launcher.java:273)
    at hudson.tasks.Maven.perform(Maven.java:267)
    at hudson.plugins.sonar.utils.SonarMaven.executeMaven(Son    arMaven.java:149)
    at hudson.plugins.sonar.SonarPublisher.executeSonar(Son    arPublisher.java:331)
    at hudson.plugins.sonar.SonarPublisher.perform(SonarPublisher.java:292)
    at hudson.tasks.BuildStepMonitor.perform(BuildStepMonitor.java:51)
    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:736)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:714)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:690)
    at hudson.model.Build$RunnerImpl.post2(Build.java:163)
    at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:652)
    at hudson.model.Run.run(Run.java:1519)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
    at hudson.model.ResourceController.execute(ResourceController.java:82)
    at hudson.model.Executor.run(Executor.java:137)
Caused by: java.io.IOException: error=13, Permission denied
    at java.lang.UNIXProcess.forkAndExec(Native Method)
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
    at java.lang.ProcessImpl.start(ProcessImpl.java:130)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
    ... 19 more
Sonar analysis completed: FAILURE
Finished: FAILURE

Maven配置:

哈德逊档案:

.hudson333 [drwxrwxr-x]
    maven [drwxrwxr-x]
        slavebundle [drwxrwxr-x]
            bundled-maven [drwxrwxr-x]
                bin [drwxrwxr-x]
                    mvn [-rwxrwxr-w]

环境:

我找到了以下链接:

但没有有效的答案。

我找到了三种不同的解决方法: