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:
C:\sonarqube\bin\windows-x86-xx\StartSonar.bat
 # On other operating system, execute:
/etc/sonarqube/bin/[OS]/sonar.sh 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
C:\sonar-runner\bin\sonar-runner.bat
# On other operating system:
cd /etc/sonar-examples/projects/languages/java/sonar-runner/java-sonar-runner-simple
/etc/sonar-runner/bin/sonar-runner
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

 
            sonar
           
                true
           

           
               
               
                  jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
               

                root
                root

               
               
                  http://localhost:9000
               

           

       



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



8.2paste under
               
                    org.codehaus.mojo
                    sonar-maven-plugin
                    2.6
               



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

mvn clean install
mvn sonar:sonar
 
 
http://docs.sonarqube.org/display/SONAR/Setup+and+Upgrade

Hit Counter


View My Stats