Upload
adithya-kuchan
View
208
Download
0
Embed Size (px)
Citation preview
Sonar And Installation of SonarQube
Plugin in mule
By Aditya Kuchan
Download the sonar here http://dist.sonar.codehaus.org/sonar-3.5.1.zip and unzip the download to your favorite folder
Sonar Installation
Unzip and InstallAfter Unzip you will see folder structure would look something like as follows..
Run SonarDepends on your OS, you need to run the executable , for an instance if you are running linux-x86 and 64 bit, then you need to run start.sh
Sonar Console
Access your Sonar installationNow you can browse your sonar installation http:localhost:9000
Generate Sonar Report After we have the sonar installed, we can
generate the reports for any maven project, by adding the following lines in your project pom.xml
Generate Sonar Report
Go to Help > Install New Software... This
should display the Install dialog box. Paste the Update Site URL (
http://dist.sonar-ide.codehaus.org/eclipse/) into the field Work with and press Enter. This should display the list of available plugins and components:
Eclipse Integration
Figure - Sonar Eclipse Plug-in Install
Choose Sonar Java, follow the steps and install the plugin
Note: Please make sure the project that you want to associate with sonar has already analyzed in your sonar installation
Configure your local/remote sonar in your
Anypoint Studio Go to Window > Preferences > Sonar >
Servers. Sonar Eclipse is pre-configured to access a
local Sonar server listening on http://localhost:9000/. You can edit this server, delete it or add a new one.
Configure Sonar
Once the Sonar server is defined, the next
step is to link your Anypoint Studio projects with projects defined and analyzed on this Sonar server.
To do so, right-click on the project in the Project Explorer, and then Configure > Associate with Sonar...:
Link your project for the first time
In the Sonar project text field, start typing the name of the project and select it in the list box:
Click Finish. Your project is now associated to one analyzed on your Sonar server
Analyze and clean up the code violationsDo local analysis and clean the violations
Run Sonar Analysis in Local
Run Sonar Analysis on Local
Sonar violation analysis console II
sonar violation analysis console
Sonar violations Markers