1) Download the SonarQube Server - https://www.sonarqube.org/downloads/
2) Change your maven configuration in settings.xml
a) Add a profile within <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>
b) Add a plugingroup within <plugingroups>
<pluginGroup>org.sonarsource.scanner.maven</pluginGroup>
3) Start your local sonar Server - StartSonar.bat
4) Run the Maven command -(make sure you point to the right settings.xml in your IDE)
mvn clean verify sonar:sonar
5) Check the reports on :- http://localhost:9000/projects
2) Change your maven configuration in settings.xml
a) Add a profile within <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>
b) Add a plugingroup within <plugingroups>
<pluginGroup>org.sonarsource.scanner.maven</pluginGroup>
3) Start your local sonar Server - StartSonar.bat
4) Run the Maven command -(make sure you point to the right settings.xml in your IDE)
mvn clean verify sonar:sonar
5) Check the reports on :- http://localhost:9000/projects
No comments:
Post a Comment