Java 詹金斯/声纳集成

Java 詹金斯/声纳集成,java,jenkins,driver,sonarqube,h2,Java,Jenkins,Driver,Sonarqube,H2,我正在尝试使用詹金斯声纳插件 每当我尝试进行构建时,都会出现以下错误: > ERROR: Error during Sonar runner execution ERROR: Unable to execute > Sonar ERROR: Caused by: Fail to connect to database ERROR: Caused by: > Cannot create JDBC driver of class 'org.h2.Driver' for connec

我正在尝试使用詹金斯声纳插件

每当我尝试进行构建时,都会出现以下错误:

> ERROR: Error during Sonar runner execution ERROR: Unable to execute
> Sonar ERROR: Caused by: Fail to connect to database ERROR: Caused by:
> Cannot create JDBC driver of class 'org.h2.Driver' for connect URL
> 'http://localhost:9092/sonar' ERROR: Caused by: No suitable driver
> ERROR:  ERROR: To see the full stack trace of the errors, re-run Sonar
> Runner with the -e switch. ERROR: Re-run Sonar Runner using the -X
> switch to enable full debug logging. Build step 'Invoke Standalone
> Sonar Analysis' marked build as failure Finished: FAILURE
sonar服务器的我的属性文件包含以下条目

#----- Credentials
# Permissions to create tables and indexes must be granted to JDBC user.
# The schema must be created first.
sonar.jdbc.username=                       sonar
sonar.jdbc.password=                       sonar

#----- Embedded database H2
# Note : it does not accept connections from remote hosts, so the
# sonar server and the maven plugin must be executed on the same host.

# Comment the following line to deactivate the default embedded database.
sonar.jdbc.url=                           jdbc:h2:tcp://localhost:9092/sonar;create=true
sonar.jdbc.driverClassName:               org.h2.Driver

# directory containing H2 database files. By default it's the /data directory in the sonar installation.
sonar.embeddedDatabase.dataDir=D:/Sonar/sonar-3.2/data
# H2 embedded database server listening port, defaults to 9092
sonar.embeddedDatabase.port:               9092
我在jenkins for sonar中的配置文件包含以下内容:

>  # Additional parameters sonar.jdbc.dialect=h2
> sonar.jdbc.driverClassName: org.h2.Driver
> sonar.jdbc.driver=D:\Sonar\sonar-3.2\extensions\jdbc-driver\h2\h2-1.3.167.jar
我在这里错过了什么设置才能找到司机


谢谢查看您的Maven日志和pom.xml:我怀疑您使用的是旧版本的Maven Sonar插件

也许你的软件正在强制其版本为2.0

插件应该是

sonar:SonarMaven插件:3.5

org.codehaus.sonar:sonar-maven3-plugin:3.5


我根本不使用maven?你遵守这些说明了吗?别忘了设置SONAR\u RUNNER\u HOME环境变量。您的SONAR RUNNER在没有jenkins的情况下运行吗?我的意思是你能访问你的声纳的URL吗?也许driverClassName后面的冒号应该是一个=?