Sonar Setup Undefined Mandatory Properties

Learning how to use SonarQube and was doing a quick install from here

Got all the way down to step 5. My build fails when I execute: C:\sonar-runner\bin\sonar-runner.bat

I get the following error:

INFO: ------------------------------------------------------------------------
INFO: ------------------------------------------------------------------------
Total time: 7.572s
Final Memory: 8M/223M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: You must define the following mandatory properties for 'Unknown':   sonar.projectKey, sonar.projectName, sonar.projectVersion, sonar.sources
ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.

Anyone encountered a similar situation and resolved?


If you have a java project, you must create a file in the folder where you execute sonar runner. You must define the following properties inside this file:

# Required metadata
sonar.projectName=Simple Java project analyzed with the SonarQube Runner

# Comma-separated paths to directories with sources (required)

# Language

# Encoding of the source files

Hope this helps,

For me it was due to this:

In short: you should put sonar into "Post-Build Actions", not "Post-Build Steps".

For those who has similar response on CLI and guess thy setupped everything correctly, my problem was running sonar-runner command from out side of project directory. Make sure you have cd to your project and then run the command.

Inside Jenkins below sonar properties worked for me .

##to avoid this exception Caused by: org.tmatesoft.svn.core.SVNAuthenticationException: svn: E170001

Hope it will help someone. Thanks!

Need Your Help

Is there a way to make a PowerShell script work by double clicking a .ps1 file?

powershell powershell-2.0

I am distributing a PowerShell script to my team. The script is to fetch an IP address from the Vsphere client, make an mstsc connection, and log it in a shared file.

What happens when auto_increment on integer column reaches the max_value in databases?

database auto-increment integer-overflow lastinsertid

I am implementing a database application and I will use both JavaDB and MySQL as database. I have an ID column in my tables that has integer as type and I use the databases auto_increment-function ...