Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 48 Next »


This feature is available since Sonar 2.6.


  • Java 1.5 or higher
  • Sonar 2.6 or higher. The server must be up when analyzing projects.



  1. Uncompress the downloaded file into a directory named $SONAR_RUNNER_HOME in the next steps.
  2. Update the global settings (database connection, server URL) by editing the file $SONAR_RUNNER_HOME/conf/
  3. Add the $SONAR_RUNNER_HOME/bin directory to your path.
  4. 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 :


For each project a file must be created in the root directory of the project. This project configuration file must contain all properties required by Sonar to analyse the project :

Then the command 'sonar-runner' or 'sonar-runner.bat' (windows) must be executed from the project base directory to launch the Sonar analysis. That's it !

If a file can't be created in the root directory of the project, there are two alternatives :

  • Either properties can be specified directly through the command line. Ex : 'sonar-runner -Dsonar.projectKey=myproject -Dsources=src1 ...'
  • Or the property 'project.settings' can be used to specify the path to the project configuration file. Ex:  'sonar-runner -Dproject.settings=../'.

For advanced features such as reusing existing unit test reports, any Sonar advanced parameters can be defined in this project configuration file or through command-line parameters. 


If you get an java.lang.OutOfMemoryError, you can set the SONAR_RUNNER_OPTS environment variable, like this in *nix environments:

On Windows environments, avoid the double-quotes, since they get misinterpreted, turning the two parameters into a single one.


Due to SONARPLUGINS-1024, not possible to set "." as a source directory with Sonar 2.6.


Here the source code of a sample C project.



Release 1.2 (${entries.size()} issues)

Type Key Summary Priority Status Resolution


Release 1.1 (5 issues)


Release 1.0 (1 issues)

Type Key Summary Priority Status Resolution
New Feature SONARPLUGINS-951 Create a Sonar Standalone Runner (In addition to the Maven & Ant Runners) Major Closed Fixed

  • No labels