我正在尝试使用MSBuild.SonarQube.Runner进行分析。 按照此处提到的步骤http://docs.sonarqube.org/display/PLUG/C%23+Plugin
我正在使用数据库 - MySQL Server 5.6和 操作系统 - Windows
SonarQube.Analysis.xml
<Property Name="sonar.host.url">http://ipaddress:9000</Property>
<Property Name="sonar.login">sonaruser</Property>
<Property Name="sonar.password">userpassword</Property>
<Property Name="sonar.jdbc.url">jdbc:mysql://ipaddress:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance</Property>
<Property Name="sonar.jdbc.username">sonardbuser</Property>
<Property Name="sonar.jdbc.password">sonardbuserpasswd</Property>
最后一步 - MSBuild.SonarQube.Runner.exe结束
....
INFO: SonarQube Server 4.5.6
09:22:51.341 INFO - Load global referentials...
09:22:52.268 INFO - Load global referentials done: 929 ms
09:22:52.285 INFO - User cache: C:\Users\abcd\.sonar\cache
09:22:52.293 INFO - Install plugins
09:22:53.255 INFO - Install JDBC driver
09:22:53.285 INFO - Create JDBC datasource for jdbc:h2:tcp://localhost/sonar
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 5.864s
Final Memory: 3M/15M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:53)
Caused by: java.lang.IllegalStateException: Fail to connect to database
at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
请帮助,我缺少什么?