Search This Blog

Friday, May 8, 2015

Sonarqube Setup and Upgrade

Setup and Upgrade

To give a quick try at SonarQube, just follow the tutorial below.
To install a production instance, follow the installation guide.
To upgrade your SonarQube instance, read the upgrade guide and the related upgrade notes.

Get Started in Two Minutes

1. Download and unzip the SonarQube distribution (let's say in "C:\sonarqube" or "/etc/sonarqube")

2. Start the SonarQube server:
# On Windows, execute:
 # On other operating system, execute:
/etc/sonarqube/bin/[OS]/ console
3. Download and unzip the SonarQube Runner (let's say in "C:\sonar-runner" or "/etc/sonar-runner")

4. Download and unzip some project samples (let's say in "C:\sonar-examples" or "/etc/sonar-examples")

5. Analyze a project:
# On Windows:
cd C:\sonar-examples\projects\languages\java\sonar-runner\java-sonar-runner-simple
# On other operating system:
cd /etc/sonar-examples/projects/languages/java/sonar-runner/java-sonar-runner-simple
6. Browse the results at http://localhost:9000 (default System administrator credentials are admin/admin)

7. open x:\apache-maven-3.2.3\conf\settings.xml, paste under  (optional)

                <!-- Optional URL to server. Default value is http://localhost:9000 -->


8. in your project root pom.xml,
 8.1  paste under 

8.2paste under





9. Go to cmd, your project root folder and type 

mvn clean install
mvn sonar:sonar

10. goto http://localhost:9000  [under projects you can see the reports]

11. If you want Html report
mvn sonar:sonar -Dsonar.analysis.mode=preview -Dsonar.issuesReport.html.enable=true
under your /target/sonar/issues-report folder you can see the html

Hit Counter

View My Stats