Features
The Sonar Runner is recommended as the default launcher to analyze a project with Sonar.
Prerequisites
Installation
- Uncompress the downloaded file into a directory named $SONAR_RUNNER_HOME in the next steps.
Update the global settings (database connection, server URL) by editing the file $SONAR_RUNNER_HOME/conf/sonar-runner.properties
| Code Block |
|---|
|
#----- Default Sonar server
#sonar.host.url=http://localhost:9000
#----- PostgreSQL
#sonar.jdbc.url=jdbc:postgresql://localhost/sonar
#sonar.jdbc.driver=org.postgresql.Driver
#----- MySQL
#sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
#sonar.jdbc.driver=com.mysql.jdbc.Driver
#----- Oracle
#sonar.jdbc.url=jdbc:oracle:thin:@localhost/XE
#sonar.jdbc.driver=oracle.jdbc.driver.OracleDriver
#----- Global database settings
#sonar.jdbc.username=sonar
#sonar.jdbc.password=sonar
#----- Default directory layout
#sonar.sources=src/main/java
#sonar.tests=src/test/java
#sonar.binaries=target/classes
|
- Create a new SONAR_RUNNER_HOME environment variable set to $SONAR_RUNNER_HOME.
- Add the $SONAR_RUNNER_HOME/bin directory to your path.
You can check the basic installation by opening a new shell and executing the command 'sonar-runner -h' (on windows platform the command is 'sonar-runner.bat -h') . You should get a message like this :
| Code Block |
|---|
usage: sonar-runner [options]
Options:
-h,--help Display help information
-X,--debug Produce execution debug output
-D,--define <arg> Define property
|
...
You are now ready to analyze a project with the Sonar Runner.
...
Change Log
| JIRA Issues |
|---|
| anonymous | true |
|---|
| title | Release Version 2.02.1 |
|---|
| height | 150 |
|---|
| renderMode | static |
|---|
| width | 900 |
|---|
| columns | type;key;summary;priority;status;resolution |
|---|
| url | http://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+SONARPLUGINS+AND+fixVersion+%3D+%22SONAR-RUNNER-2.0%222.1%22+AND+status+%3D+Closed+ORDER+BY+priority+DESC&tempMax=1000 |
|---|
|
...
| JIRA Issues |
|---|
| anonymous | true |
|---|
| title | Release 1Version 2.42 |
|---|
| height | 150 |
|---|
| renderMode | static |
|---|
| width | 900 |
|---|
| columns | type;key;summary;priority;status;resolution |
|---|
| url | http://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+SONARPLUGINS+AND+fixVersion+%3D+%22SONAR-RUNNER-12.4%222%22+AND+status+%3D+Closed+ORDER+BY+priority+DESC&tempMax=1000 |
|---|
|
...
| JIRA Issues |
|---|
| anonymous | true |
|---|
| title | Release Version 2.1.3 |
|---|
| height | 150 |
|---|
| renderMode | static |
|---|
| width | 900 |
|---|
| columns | type;key;summary;priority;status;resolution |
|---|
| url | http://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+SONARPLUGINS+AND+fixVersion+%3D+%22STANDALONE%22SONAR-RUNNER-12.3%221%22+AND+status+%3D+Closed+ORDER+BY+priority+DESC&tempMax=1000 |
|---|
|
...
| JIRA Issues |
|---|
| anonymous | true |
|---|
| title | Release 1Version 2.20 |
|---|
| height | 150 |
|---|
| renderMode | static |
|---|
| width | 900 |
|---|
| columns | type;key;summary;priority;status;resolution |
|---|
| url | http://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=project+%3D+SONARPLUGINS+AND+fixVersion+%3D+%22STANDALONE%22SONAR-RUNNER-12.2%220%22+AND+status+%3D+Closed+ORDER+BY+priority+DESC&tempMax=1000 |
|---|
|
...
| JIRA Issues |
|---|
| anonymous | true |
|---|
| title | Release Version 1.14 |
|---|
| height | 150 |
|---|
| renderMode | static |
|---|
| width | 900 |
|---|
| columns | type;key;summary;priority;status;resolution |
|---|
| url | http://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=17194&pid=11911&sorter/field=issuekey&sorter/order=DESC&tempMax=1000 |
|---|
|
| JIRA Issues |
|---|
| anonymous | true |
|---|
| title | Release 1.0 |
|---|
| height | 70 |
|---|
| width | 900 |
|---|
| columns | type;key;summary;priority;status;resolution |
|---|
| url | http://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor=17130&pid=11911&sorter/field=issuekey&sorter/order=jqlQuery=project+%3D+SONARPLUGINS+AND+fixVersion+%3D+%22SONAR-RUNNER-1.4%22+AND+status+%3D+Closed+ORDER+BY+priority+DESC&tempMax=1000 |
|---|
|