java - Jenkins / Sonar integration -
i trying use jenkins sonar plugin,
whenever try build following error;
> error: error during sonar runner execution error: unable execute > sonar error: caused by: fail connect database error: caused by: > cannot create jdbc driver of class 'org.h2.driver' connect url > 'http://localhost:9092/sonar' error: caused by: no suitable driver > error: error: see full stack trace of errors, re-run sonar > runner -e switch. error: re-run sonar runner using -x > switch enable full debug logging. build step 'invoke standalone > sonar analysis' marked build failure finished: failure my properties file sonar server has following entries
#----- credentials # permissions create tables , indexes must granted jdbc user. # schema must created first. sonar.jdbc.username= sonar sonar.jdbc.password= sonar #----- embedded database h2 # note : not accept connections remote hosts, # sonar server , maven plugin must executed on same host. # comment following line deactivate 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. default it's /data directory in sonar installation. sonar.embeddeddatabase.datadir=d:/sonar/sonar-3.2/data # h2 embedded database server listening port, defaults 9092 sonar.embeddeddatabase.port: 9092 my config file in jenkins sonar contains following;
> # 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 what setting missing here driver found?
thanks
check maven logs , pom.xml : suspect using old version of maven sonar plugin.
maybe forcing version 2.0.
the plugin should either
org.codehaus.sonar:sonar-maven-plugin:3.5
or
org.codehaus.sonar:sonar-maven3-plugin:3.5
Comments
Post a Comment