- Build the project running
mvn clean install
. - Go to
target
directory. Copysvs-sonar-java-rules-<version>.jar
into$SONARQUBE_HONE/extensions/plugins
. - Restart SonarQube server.
- Goto http://localhost:9000/profiles and make sure profile 'SVS Code Convention Rules' is exists and active.
Useful links to start from: *SonarQube platform documentation *Developer documentation *Plugin example sources *Sonar Java plugin sources *SonarQube sources *SonarQube google group
Suppose that:
- Your SonarQube server is running on
SERVER_ADDRESS=http://localhost:9000
. - SonarQube uses MySQL database accessible via jdbc
SERVER_JDBC_URL=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
.
- Download SonarQube Runner
- Edit SonarQube Runner config at
$SONARQUBE_RUNNER_HOME/conf/sonar-runner.properties
2.1. Setupsonar.host.url=$SERVER_ADDRESS
2.2. Setupsonar.jdbc.url=$SERVER_JDBC_URL
2.3. Setupsonar.jdbc.username
andsonar.jdbc.password
2.4. Setupsonar.login
andsonar.password
. Default is admin/admin - Add
sonar-project.properties
into the root of a project to be analyzed. As described here in section 'Simple Project'. Additional SonarQube Runner parameters can be found here - Run
$SONARQUBE_RUNNER_HOME/bin/sonar-runner
from the project root.