java - SonarQube try to use 'org.h2.Driver' when MySql has been specified instead -


requirement mvn clean install sonar:sonar deploy/install snapshots machine maven machine sonarqube store in machine mysql has mysql database. machine mysql visible machine sonarqube. machine sonarqube visible intranet within intranet can access it. when running mvn clean install sonar:sonar machine maven following error occurs:

[error] failed execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project my-project: fail connect database: cannot load jdbc driver class 'org.h2.driver' -> [help 1]

machine maven has following profile in ~/.m2/settings.xml:

<profile>     <id>sonar</id>     <activation>         <activebydefault>true</activebydefault>     </activation>     <properties>         <sonar.host.url>https://sonarqube.myproject.com</sonar.host.url>     </properties> </profile> 

sonar-maven-plugin has been added per documentation found in here.

also sonar-maven-plugin has been added dependency pom.xml:

<dependency>     <groupid>org.codehaus.mojo</groupid>     <artifactid>sonar-maven-plugin</artifactid>     <version>2.5</version> </dependency> 

i know documentation asks jdbc driver, url, username , password specified in maven settings sonar profile properties don't want expose other people, has been specified in machine sonarqube conf/sonar.properties

is there way depoly/install these snapshots machine mysql through machine sonarqube run 'mvn clean install sonar:sonar' machine maven?

thanks in advance.

in post sonar fails connect mysql tries jdbc:h2:tcp://localhost/sonar, it´s appear properties incompleted.

try add follow properties "sonar profile" in maven settings file ~/.m2/settings.xml :

<profile>   <id>sonar</id>   <activation>     <activebydefault>true</activebydefault>   </activation>   <properties>     <sonar.jdbc.url>jdbc:mysql://localhost:3306/sonar</sonar.jdbc.url>     <sonar.jdbc.username>user_of_the_sonar_database</sonar.jdbc.username>     <sonar.jdbc.password>password_of_the_userdatabase</sonar.jdbc.password>     <sonar.host.url>http://localhost:9000</sonar.host.url>   </properties> </profile> 

note: <sonar.jdbc.url></sonar.jdbc.url> depens on database use.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -