title: Adding Post-build Actions Sonar causes Jenkins build to fail
body: <p>Using Jenkins ver. 1.494; <a href="http://docs.codehaus.org/pages/viewpage.action?pageId=116359341" rel="nofollow">Jenkins Sonar Plugin 2.0.1</a>; Sonar server 3.4.1.
  <a href="http://docs.codehaus.org/display/SONAR/Triggering+Sonar+on+Jenkins+Job#TriggeringSonaronJenkinsJob-TriggeringaSonarAnalysiswithMaven" rel="nofollow">Maven job.</a></p>
  
  <p>Adding Post-build Actions <code>Sonar</code> causes Jenkins build to fail (ERROR: Failed to parse POMs).
  Deleting Sonar action then again makes it pass.</p>
  
  <pre><code>Sync complete, took 35 ms
  Parsing POMs
  [Atlas_Phevos] $ java -Xmx512m -XX:MaxPermSize=128m -cp /home/jenkins/jenkins-home/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.2.jar:/home/jenkins/jenkins-home/tools/Maven/Maven304/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /home/jenkins/jenkins-home/tools/Maven/Maven304 /usr/local/tomcat-6.0.32/webapps/jenkins/WEB-INF/lib/remoting-2.19.jar /home/jenkins/jenkins-home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.2.jar 60147
  ERROR: Failed to parse POMs
  java.io.IOException: Cannot run program "java" (in directory "/home/jenkins/jenkins-home/workspace/Atlas_Phevos"): java.io.IOException: error=2, No such file or directory
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
      at hudson.Proc$LocalProc.&lt;init&gt;(Proc.java:244)
      at hudson.Proc$LocalProc.&lt;init&gt;(Proc.java:216)
      at hudson.Launcher$LocalLauncher.launch(Launcher.java:763)
      at hudson.Launcher$ProcStarter.start(Launcher.java:353)
      at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:223)
      at hudson.maven.ProcessCache.get(ProcessCache.java:231)
      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:670)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:586)
      at hudson.model.Run.execute(Run.java:1543)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:236)
  Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
      at java.lang.UNIXProcess.&lt;init&gt;(UNIXProcess.java:148)
      at java.lang.ProcessImpl.start(ProcessImpl.java:65)
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
      ... 12 more
  Skipping sonar analysis due to bad build status FAILURE
  Sending e-mails to: ____
  Finished: FAILURE
  </code></pre>
  
  <p>I haven't put <a href="http://docs.codehaus.org/display/SONAR/Installing+and+Configuring+Maven" rel="nofollow">updated setting.xml</a> on Jenkins server, I guess Jenkins should take its own configuration for Sonar (sever, JDBC connection etc.)</p>
  
  <p>UPDATE: Problem still exists. I tried several jobs to start sonar analysis.</p>