Problem scenario
You run sonar-scanner from the command prompt, but you receive an error. The error looks like one of the following:
"Task '-x' does not exist. Please use 'list' task to see all available tasks"
"You must define the folowing mandatory properties for 'Unknown': sonar.projectKey, sonar.sources"
What should you do to get sonar-scanner to work?
Solution
Run the sonar-scanner command from a local directory where you have sonar-project.properties.