Step 4 - Run Analyses
To run the analysis it is sufficient to issue the following commands (from within) the project root directory.
To run the analysis only:
mvn sonar:sonar
the usual Maven options do apply, e.g.
to skip the tests:
mvn clean install sonar:sonar -DskipTests=true
or, to perform the tests:
mvn clean install sonar:sonar -Dmaven.test.failure.ignore=true
or, to get also coverage information:
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install -Dmaven.test.failure.ignore=true
mvn org.jacoco:jacoco-maven-plugin:report
mvn sonar:sonar -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml
More details are available here.