For reference:
 
the problem turned out that the project name on Jenkins contained a whitespace while the directory on my developer machine didn't
Since Gradle automatically takes that as project.name and the sonarRunner obviously doesn't like white space in the project name, it failed on Jenkins.
 
Solution: change the Jenkins project name and/or explicitly set the project.name in Gradle (which sounds like a good idea, anyway)
 
Gesendet: Montag, 26. August 2013 um 14:05 Uhr
Von: "Christoph Kutzinski" <ku...@gmx.de>
An: "Jenkins Users" <jenkinsci-users@googlegroups.com>
Betreff: gradle sonar-runner fails on Jenkins
Hi,
 
I've got the problem that the sonar task fails when running from Jenkins, but suceeds when running on a developer machine or even on the Jenkins build node when running from the shell.
 
Console output:
11:53:28  :sonarRunner
11:53:28  11:53:28.124 INFO  .s.b.b.BatchSettings - Load batch settings
11:53:28  :sonarRunner FAILED
11:53:28  
11:53:28  FAILURE: Build failed with an exception.
11:53:28  
11:53:28  * What went wrong:
11:53:28  Execution failed for task ':sonarRunner'.
11:53:28  > java.lang.IllegalArgumentException: Illegal character in query at index 95: http://xyz:9000/batch_bootstrap/properties?project=com.example:LIS sonar
11:53:28  
11:53:28  * Try:
11:53:28  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
 
Relevant part of build.gradle:
sonarRunner {
    sonarProperties {
        property "sonar.host.url", "http://xyz:9000/"
        property "sonar.jdbc.url", "jdbc:postgresql://xyz/sonar"
        property "sonar.jdbc.driverClassName", "org.postgresql.Driver"
        property "sonar.jdbc.username", "sonar"
        property "sonar.jdbc.password", "sonar01"
        property "suppressions-file-location",  "${projectDir}/config/checkstyle/suppressions.xml"
    }
}
 
The problem seems to me the whitespace between 'LIS' and 'sonar', but I've got no idea why the escaping works when running from the shell but not from within Jenkins.
 
Can anyone help?
 
 
Thanks
Christoph
 
 

 

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to