-
Bug
-
Resolution: Incomplete
-
Major
-
None
-
Windows
In the Sonar plugin we are using ArgumentListBuilder to create the command line to be executed for sonar analysis.
In case we add a parameter containing a & (for example -Dsonar.jdbc.url=jdbc:mysql://192.168.0.13:3306/sonar?useUnicode=true&characterEncoding=utf8) the execution fails on Windows because the parameter should be escaped.
Produced command line:
c:\jenkins\tools\Sonar_Runner\Sonar_runner_2.0\bin\sonar-runner.bat -Dsonar.jdbc.driver=com.mysql.jdbc.Driver -Dsonar.jdbc.url=jdbc:mysql://192.168.0.13:3306/sonar?useUnicode=true&characterEncoding=utf8 ******** ******** -Dsonar.host.url=http://192.168.0.13:9000 "-Dsonar.projectBaseDir=c:\jenkins\workspace\Freestyle avec SCM" -Dsonar.projectName=Branding -Dsonar.projectVersion=1.0 -Dsources=src/main/java -Dsonar.projectKey=sonar:branding
Expected:
c:\jenkins\tools\Sonar_Runner\Sonar_runner_2.0\bin\sonar-runner.bat -Dsonar.jdbc.driver=com.mysql.jdbc.Driver "-Dsonar.jdbc.url=jdbc:mysql://192.168.0.13:3306/sonar?useUnicode=true&characterEncoding=utf8" ******** ******** -Dsonar.host.url=http://192.168.0.13:9000 "-Dsonar.projectBaseDir=c:\jenkins\workspace\Freestyle avec SCM" -Dsonar.projectName=Branding -Dsonar.projectVersion=1.0 -Dsources=src/main/java -Dsonar.projectKey=sonar:branding