Canarys | IT Services

Blogs

Sonar Integration with TFS for Java Projects

,
Share

Sonar Integration with JAVA.

1.Download sonar-3.7 and sonar-runner-2.3*** unzip folders and copy the contents in c drive.

http://docs.codehaus.org/display/SONAR/Installing+and+Configuring+SonarQube+Runner

                         Downloads

2.Run InstallNTService, StartNTService and StartSonar bat files. from :-> sonar-3.7

                        Installation

3.Create “SONAR_RUNNER_HOME” variable “C:sonar-runner-2.3” add C:sonar-runner-2.3bin to path

                            Environment Variable

4.Install sonar in Eclipse : with http://dist.sonar-ide.codehaus.org/eclipse/

                                  Sonar in Eclipse

5.check for the server availability: windows->Perspective->sonar->server URL-> click and check for availability.

                       Sonar window          Sonar settings in Eclipse

                         Running Sonar as a Standalone for java projects.

                         1. create sonar-project.properties in root folder.

Sonar-Project.properties file

                2. Open command prompt as Administrator: travers to the path of your project folder

                3. Run sonar-runner command  c:fabrikam>sonar-runner

Sonar-Runner

            4. Go to sonar portal and check for application association to sonar.

Analysis Result         Sonar Analysis results

                5. Please follow below link for more info..

                      http://docs.codehaus.org/display/SONAR/Installing+SonarQube+in+Eclipse

6. First time login UserName:  admin

                    Password: admin

                                       Running sonar as a part of Team Build for Java projects.

                  1. Download Sonar-ant-task-2.1.jar. copy it to Ant_Homelib .

                        http://repository.codehaus.org/org/codehaus/sonar-plugins/sonar-ant-task/2.1/sonar-ant-task-2.1.jar

                 2.Include sonar property tags in build.xml.

Ant task in Build file    Build Script Continuation.

               3.Define Build

Build Defination         Build Defination

               4.Select ant script

Ant Script Build ScriptBuild Xml

Build Result

5.Sonar portal will be updated Once the build is successful.  

Leave a Reply

Your email address will not be published. Required fields are marked *

Reach Us

With Canarys,
Let’s Plan. Grow. Strive. Succeed.