• Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • sonar-plugin
    • None

      The project is a free-form project and it is building not on the master, but on a build node.

      [trunk] $ mvn -f pom.xml -e -B sonar:sonar -Dsonar.jdbc.driver=com.mysql.jdbc.Driver -Dsonar.jdbc.url=jdbc:mysql://xxxxx:3306/sonar ******** ******** -Dsonar.host.url=http://xxxxx:9000/
      FATAL: command execution failed
      java.io.IOException: Cannot run program "mvn" (in directory "/export/build/hudson-slave/workspace/myproject/trunk"): java.io.IOException: error=2, No such file or directory
      	at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
      	at hudson.Proc$LocalProc.<init>(Proc.java:149)
      	at hudson.Proc$LocalProc.<init>(Proc.java:121)
      	at hudson.Launcher$LocalLauncher.launch(Launcher.java:638)
      	at hudson.Launcher$ProcStarter.start(Launcher.java:273)
      	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:793)
      	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:767)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:114)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:270)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	at java.lang.Thread.run(Thread.java:619)
      Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
      	at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
      	at java.lang.ProcessImpl.start(ProcessImpl.java:65)
      	at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
      	... 15 more
      Finished: FAILURE
      

          [JENKINS-6796] "mvn" No such file or directory

          Michael Rumpf created issue -
          Michael Rumpf made changes -
          Description Original: The project is a free-form project and it is building not on the master, but on a build node.

          {nofromat}
          [trunk] $ mvn -f pom.xml -e -B sonar:sonar -Dsonar.jdbc.driver=com.mysql.jdbc.Driver -Dsonar.jdbc.url=jdbc:mysql://xxxxx:3306/sonar ******** ******** -Dsonar.host.url=http://xxxxx:9000/
          FATAL: command execution failed
          java.io.IOException: Cannot run program "mvn" (in directory "/export/build/hudson-slave/workspace/myproject/trunk"): java.io.IOException: error=2, No such file or directory
          at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
          at hudson.Proc$LocalProc.<init>(Proc.java:149)
          at hudson.Proc$LocalProc.<init>(Proc.java:121)
          at hudson.Launcher$LocalLauncher.launch(Launcher.java:638)
          at hudson.Launcher$ProcStarter.start(Launcher.java:273)
          at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:793)
          at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:767)
          at hudson.remoting.UserRequest.perform(UserRequest.java:114)
          at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          at hudson.remoting.Request$2.run(Request.java:270)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
          at java.util.concurrent.FutureTask.run(FutureTask.java:138)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:619)
          Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
          at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
          at java.lang.ProcessImpl.start(ProcessImpl.java:65)
          at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
          ... 15 more
          Finished: FAILURE
          {noformat}
          New: The project is a free-form project and it is building not on the master, but on a build node.

          {code}
          [trunk] $ mvn -f pom.xml -e -B sonar:sonar -Dsonar.jdbc.driver=com.mysql.jdbc.Driver -Dsonar.jdbc.url=jdbc:mysql://xxxxx:3306/sonar ******** ******** -Dsonar.host.url=http://xxxxx:9000/
          FATAL: command execution failed
          java.io.IOException: Cannot run program "mvn" (in directory "/export/build/hudson-slave/workspace/myproject/trunk"): java.io.IOException: error=2, No such file or directory
          at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
          at hudson.Proc$LocalProc.<init>(Proc.java:149)
          at hudson.Proc$LocalProc.<init>(Proc.java:121)
          at hudson.Launcher$LocalLauncher.launch(Launcher.java:638)
          at hudson.Launcher$ProcStarter.start(Launcher.java:273)
          at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:793)
          at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:767)
          at hudson.remoting.UserRequest.perform(UserRequest.java:114)
          at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          at hudson.remoting.Request$2.run(Request.java:270)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
          at java.util.concurrent.FutureTask.run(FutureTask.java:138)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:619)
          Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
          at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
          at java.lang.ProcessImpl.start(ProcessImpl.java:65)
          at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
          ... 15 more
          Finished: FAILURE
          {code}

          Michael Rumpf added a comment -

          I to modify the PATH environment variable with the Setenv plugin, but that does not seem to work:

          name: PATH
          value: ${PATH}:/export/build/maven/bin

          The only chance now is to add mvn globally to the PATH...

          Michael Rumpf added a comment - I to modify the PATH environment variable with the Setenv plugin, but that does not seem to work: name: PATH value: ${PATH}:/export/build/maven/bin The only chance now is to add mvn globally to the PATH...

          Michael Rumpf added a comment -

          Might be releated. But in my case I am running a free-form Ant build and I try to run sonar after the actual Ant build is done.
          We create a pom.xml for the Sonar analysis during the Ant build, so the pom.xml is not the issue.

          Michael Rumpf added a comment - Might be releated. But in my case I am running a free-form Ant build and I try to run sonar after the actual Ant build is done. We create a pom.xml for the Sonar analysis during the Ant build, so the pom.xml is not the issue.
          Michael Rumpf made changes -
          Link New: This issue duplicates JENKINS-6718 [ JENKINS-6718 ]

          godin added a comment -

          godin added a comment - See SONARPLUGINS-459
          godin made changes -
          Assignee Original: Sonar Team [ sonarteam ] New: godin [ godin ]

          godin added a comment -

          BTW, did you specified Maven version to use in Sonar configuration for Job ?

          godin added a comment - BTW, did you specified Maven version to use in Sonar configuration for Job ?
          godin made changes -
          Link Original: This issue duplicates JENKINS-6718 [ JENKINS-6718 ]

          godin added a comment -

          Closed as outdated.

          godin added a comment - Closed as outdated.
          godin made changes -
          Resolution New: Won't Fix [ 2 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

            godin godin
            mirumpf Michael Rumpf
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: