I have a problem using Jenkins and Sonar. Here is my setup: a main linux server hosting Jenkins and Sonar and a windows vm to build a project. The windows vm is configured as a Jenkins slave , and the job I defined can successfully get project source and perform a ant build. But it fails at running Sonar analysis using sonar runner.
The error raised says "java.sql.SQLException: No database selected" and while looking at the console output, I see twice the jdbc url parameter:
... "-Dsonar.jdbc.url=jdbc:mysql://xxx.xx.xx.xxx:3306/sonar?userUnicode=true&characterEncoding=utf8" ... -Dsonar.jdbc.url=jdbc:mysql://xxx.xx.xx.xxx:3306 ...
So obviously the second parameter is the one used, and is missing the database name. If I change the second parameter and launch it from command line, it works fine.
The question is: why my parameter is overwritten and how can I change it?
Thanks for any help
在修改了几个参数之后,我的解决方法仅仅是重启Jenkins备用代理...由于这不是一个完整的解释,欢迎任何有更多详细信息的人发布另一个答案。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.