Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0
-
Fix Version/s: 2.0.1
-
Labels:None
-
Environment:Jenkins 1.487
-
Number of attachments :
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: /$
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
- duplicates
-
SONARJNKNS-15
Unable to load the sonar-project.properties file when the location of the file is relative to the project root directory
-
Same issue than SONARPLUGINS-2395