Difference between revisions of "SonarQube"
Jump to navigation
Jump to search
Line 11: | Line 11: | ||
2) Copier (ou modifier) le fichier suivant dans ~/.m2/settings.xml |
2) Copier (ou modifier) le fichier suivant dans ~/.m2/settings.xml |
||
<pre> |
<pre> |
||
+ | |||
+ | <settings> |
||
+ | <pluginGroups> |
||
+ | <pluginGroup>org.sonarsource.scanner.maven</pluginGroup> |
||
+ | </pluginGroups> |
||
+ | <profiles> |
||
+ | <profile> |
||
+ | <id>sonar</id> |
||
+ | <activation> |
||
+ | <activeByDefault>true</activeByDefault> |
||
+ | </activation> |
||
+ | <properties> |
||
+ | <!-- Optional URL to server. Default value is http://localhost:9000 --> |
||
+ | <sonar.host.url> |
||
+ | http://localhost:9000 |
||
+ | </sonar.host.url> |
||
+ | </properties> |
||
+ | </profile> |
||
+ | </profiles> |
||
+ | </settings> |
||
</pre> |
</pre> |
Revision as of 10:13, 21 December 2017
Sonar en 10 minutes top chrono
1) Lancer le container Sonar
docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube
2) Copier (ou modifier) le fichier suivant dans ~/.m2/settings.xml
<settings> <pluginGroups> <pluginGroup>org.sonarsource.scanner.maven</pluginGroup> </pluginGroups> <profiles> <profile> <id>sonar</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <!-- Optional URL to server. Default value is http://localhost:9000 --> <sonar.host.url> http://localhost:9000 </sonar.host.url> </properties> </profile> </profiles> </settings>
3) Dans votre projet Maven
cd mon_projet mvn clean verify sonar:sonar
4) Ouvrir la page des rapports Sonar http://localhost:9000
Attention: l'accès aux rapports n'est pas sécurisé