The bit you shared does not look like script - it is rather just a bunch of properties and values assigned to them. It is also not clear how the scanner is executed here. You may want to save those to sonar-project.properties in the project root directory (as explained at https://docs.sonarqube.org/latest/analysis/scan/sonarscanner/) and re-exeucte the scan.
sorry for typo,It is not a script, it is a property file contents.I already followed the steps mentioned in the document and installed the sonar scanner in the below path C:\Users\Ganesh\Downloads\sonarqube-8.2.0.32929\scanner\sonar-scanner-4.2.0.1873-windows and I saved the property file and script files (.sql) in the below path C:\Users\Ganesh\Downloads\sonarqube-8.2.0.32929\scanner\sonar-scanner-4.2.0.1873-windows\bin
I navigated to the root directory (C:\Users\Ganesh\Downloads\sonarqube-8.2.0.32929\scanner\sonar-scanner-4.2.0.1873-windows\bin>) and ran the sonar-scanner.bat file but I am getting the error message as “You must define the following mandatory properties for ‘Unknown’: sonar.projectKey”
Add the sonar-scanner.bat location to you PATH environment variable, cd to the directory of the project (where the sonar-project.properties reside) and run the analysis from there.
Let me know how did that go.
Kris
I added the sonar-scanner.bat location to my PATH environment variable, cd to the directory and ran the analysis from there,I am still getting the same error message.