Config Sona and Run

settings.xml add below

<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!-- Sonar Host e.g. http://localhost:9000 -->
<sonar.host.url>
http://localhost:9000
</sonar.host.url>
</properties>
</profile>
</profiles>

 

Exclusion files in pom.xml

<sonar.exclusions>

/usr/file1

/usr/file2


</sonar.exclusions>

Run Sona using maven

mvn clean install  sonar:sonar -s /maven/location/settings.xml

Leave a Reply

Your email address will not be published. Required fields are marked *