Wie SonarCube die Unit Test Coverage ermittelt
Damit diese Kombination funktioniert, benötigt man ein Profile mit den benötigten Angaben zum Sonar Server und zur Datenbank. Normalerweise reicht es, die folgenden Zeilen in der ~/.m2/settings.xml Datei hinzu zu fügen bzw. die Datei entsprechend anzupassen.
<settings> [...] <profiles> [...] <profile> <id>sonar</id> <properties> <sonar.host.url>http: //****:9000</sonar.host.url> <sonar.login>****</sonar.login> <sonar.password>****</sonar.password> <sonar.jdbc.username>****</sonar.jdbc.username> <sonar.jdbc.password>****</sonar.jdbc.password> </properties> </profile> </profiles> <!-- activeProfiles | List of profiles that are active for all builds. | --> <activeProfiles> <activeProfile>sonar</activeProfile> </activeProfiles> </settings> |
Details auch im internen Wiki.