Skip to content

Latest commit

 

History

History
 
 

sonar-codequality-collector

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

CodeQuality Collector

This project uses Spring Boot to package the collector as an executable JAR with dependencies.

Building and Deploying

Run

mvn install

to package the collector into an executable JAR file. Copy this file to your server and launch it using :

java -JAR sonar-collector.jar

You will need to provide an application.properties file that contains information about how to connect to the Dashboard MongoDB database instance, as well as properties the Sonar collector requires. See the Spring Boot documentation for information about sourcing this properties file.

###Sample application.properties file

#Database Name
database=dashboard

#Database HostName - default is localhost
dbhost=10.0.1.1

#Database Port - default is 27017
dbport=27017

#Database Username - default is blank
dbusername=db

#Database Password - default is blank
dbpassword=dbpass

#Collector schedule (required)
sonar.cron=0 0/5 * * * *

#Sonar server(s) (required) - Can provide multiple
sonar.servers[0]=http://sonar.company.com

#Sonar Metrics
sonar.metrics=ncloc,line_coverage,violations,critical_violations,major_violations,blocker_violations,sqale_index,test_success_density,test_failures,test_errors,tests