Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-20555

Build fails when Sonar is enabled in Post Build action

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Maven job fails to build when Sonar is turned on.

      Here is the log:
      [INFO] — maven-compiler-plugin:3.0:compile (default-compile) @ manage —
      [INFO] Changes detected - recompiling the module!
      [INFO] Compiling 179 source files to /usr01/var/lib/jenkins/jobs/Mercury Manage Trunk (Nightly)/workspace/target/classes
      [INFO] -------------------------------------------------------------
      [ERROR] COMPILATION ERROR :
      [INFO] -------------------------------------------------------------
      [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
      [INFO] 1 error
      [INFO] -------------------------------------------------------------
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 6.484s
      [INFO] Finished at: Wed Nov 13 17:54:57 SGT 2013
      [INFO] Final Memory: 12M/212M
      [INFO] ------------------------------------------------------------------------

      Sonar plugin: 2.2.2
      Java JDK: 7u25

        Attachments

          Activity

          Hide
          fsilvateles Fernando Teles added a comment - - edited

          I had the same problem. To solve, try to configure JDK field in the Sonar Analysys Step and choose a literal JDK version, (don't use "Inherit From Job"), in my case it was jdk1.7.0_71. It worked for me.

          Show
          fsilvateles Fernando Teles added a comment - - edited I had the same problem. To solve, try to configure JDK field in the Sonar Analysys Step and choose a literal JDK version, ( don't use "Inherit From Job"), in my case it was jdk1.7.0_71. It worked for me.

            People

            Assignee:
            sonarteam Sonar Team
            Reporter:
            chinboon Chin Boon Oh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: