SonarQube Jenkins
  1. SonarQube Jenkins
  2. SONARJNKNS-15

Unable to load the sonar-project.properties file when the location of the file is relative to the project root directory

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.1
    • Labels:
    • Environment:
      Jenkins 1.487
      Sonar Plugin 2.0
      Linux Debian 6.0
    • Number of attachments :
      1

      Description

      Hi,

      After plugin update from 1.8 to 2.0 version, plugin is unable to find the sonar project properties file, located from the begining in the main project directory. Details below.

      Regards
      Tomasz Zieleniewski

      FATAL: Fail to load file: /sonar-project.properties
      java.lang.IllegalStateException: Fail to load file: /sonar-project.properties
      at hudson.plugins.sonar.SonarRunnerBuilder.toProperties(SonarRunnerBuilder.java:298)
      at hudson.plugins.sonar.SonarRunnerBuilder.populateConfiguration(SonarRunnerBuilder.java:272)
      at hudson.plugins.sonar.SonarRunnerBuilder.perform(SonarRunnerBuilder.java:199)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:807)
      at hudson.model.Build$BuildExecution.build(Build.java:199)
      at hudson.model.Build$BuildExecution.doRun(Build.java:160)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:589)
      at hudson.model.Run.execute(Run.java:1516)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:236)
      Caused by: java.io.FileNotFoundException: sonar-project.properties (No such file or directory)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.<init>(FileInputStream.java:120)
      at hudson.plugins.sonar.SonarRunnerBuilder.toProperties(SonarRunnerBuilder.java:293)
      ... 11 more

        Issue Links

          Activity

          Hide
          Freddy Mallet added a comment -

          Could you describe how the Hudson/Jenkins job is configured to launch Sonar ?
          thanks

          Show
          Freddy Mallet added a comment - Could you describe how the Hudson/Jenkins job is configured to launch Sonar ? thanks
          Hide
          Tomasz Zieleniewski added a comment -

          There is a build step added: "Invoke Standalone Sonar Analisys".
          The "Path to project properties" value is to sonar-project.properties.
          Screenshot attached.
          Cheers
          Tomasz

          Show
          Tomasz Zieleniewski added a comment - There is a build step added: "Invoke Standalone Sonar Analisys". The "Path to project properties" value is to sonar-project.properties. Screenshot attached. Cheers Tomasz
          Hide
          Julien HENRY added a comment -

          Fixed by properly considering this parameter as a path relative to module root.

          Show
          Julien HENRY added a comment - Fixed by properly considering this parameter as a path relative to module root.
          Hide
          Tomasz Zieleniewski added a comment -

          How to upgrade the pluging in the Jenkins installtion. While this was fixed in 2.0.1 and the Jenkins plugin version is 2.0?

          Show
          Tomasz Zieleniewski added a comment - How to upgrade the pluging in the Jenkins installtion. While this was fixed in 2.0.1 and the Jenkins plugin version is 2.0?
          Hide
          Julien HENRY added a comment -

          Version 2.0.1 was not yet released. I think it should be done next week after proper testing. If you want to test the fix and give feedback you can build from source or get a snapshot from http://repository-sonarplugins.forge.cloudbees.com/snapshot/org/jvnet/hudson/plugins/sonar/2.1-SNAPSHOT/sonar-2.1-SNAPSHOT.hpi

          Show
          Julien HENRY added a comment - Version 2.0.1 was not yet released. I think it should be done next week after proper testing. If you want to test the fix and give feedback you can build from source or get a snapshot from http://repository-sonarplugins.forge.cloudbees.com/snapshot/org/jvnet/hudson/plugins/sonar/2.1-SNAPSHOT/sonar-2.1-SNAPSHOT.hpi
          Hide
          Fabrice Bellingard added a comment -

          Manually tested.

          Show
          Fabrice Bellingard added a comment - Manually tested.

            People

            • Assignee:
              Julien HENRY
              Reporter:
              Tomasz Zieleniewski
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: