SonarQube Jenkins
  1. SonarQube Jenkins
  2. SONARJNKNS-58

Slash preceding value for location of sonar-project.properties

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.1
    • Labels:
      None
    • Environment:
      Jenkins 1.487
    • Number of attachments :
      0

      Description

      After upgrading Jenkins Sonar plugin from v1.8 to v2.0, jobs using sonar runner wouldn't complete.

      I reference the location of sonar-project.properties as follows:

      Path to project properties: {{$

      {WORKSPACE}/sonar-project.properties}}

      I now get this build error:
      
      

      FATAL: Fail to load file: /${WORKSPACE}

      /sonar-project.properties
      java.lang.IllegalStateException: Fail to load file: /$

      {WORKSPACE}/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: ${WORKSPACE}

      /sonar-project.properties (No such file or directory)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.<init>(FileInputStream.java:137)
      at hudson.plugins.sonar.SonarRunnerBuilder.toProperties(SonarRunnerBuilder.java:293)
      ... 11 more

      
      

      In v1.8, the preceding slash was not there. Downgrading from v2.0 to v1.8 is my short term solution.

      Perhaps there is some different way I should be referencing the location of sonar-project.properties?

        Issue Links

          Activity

          Hide
          Julien HENRY added a comment -

          Same issue than SONARPLUGINS-2395

          Show
          Julien HENRY added a comment - Same issue than SONARPLUGINS-2395
          Hide
          Fabrice Bellingard added a comment -

          Manually tested!

          Show
          Fabrice Bellingard added a comment - Manually tested!

            People

            • Assignee:
              Julien HENRY
              Reporter:
              Miles Tillinger
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: