When trying to execute Sonarqube on a Jenkins pipeline I get a "Project root configuration file: NONE" log message

I am trying to learn the basics of sonarqube, I have set it up on my jenkins pipeline (which uses MSBuild to compile the project) and the set a step to execute SonarQube but after reading and watching a few tutorials and the documentation itself I think I got a bit lost as when my pipeline finishes executing I go to my SonarQube server and I my project says The main branch has no lines of code.. I get the following log when running the sonarqube step on my jenkins:

00:10:43.369  Injecting SonarQube environment variables using the configuration: SonarQube
[Pipeline] {
[Pipeline] bat
00:10:43.653  
00:10:43.653  C:\Users\anton\.jenkins\workspace\Boston>C:\Users\anton\.jenkins\tools\hudson.plugins.sonar.MsBuildSQRunnerInstallation\Sonnar_scanner\sonar-scanner-4.4.0.2170\bin\sonar-scanner.bat   
00:10:43.653  INFO: Scanner configuration file: C:\Users\anton\.jenkins\tools\hudson.plugins.sonar.MsBuildSQRunnerInstallation\Sonnar_scanner\sonar-scanner-4.4.0.2170\bin\..\conf\sonar-scanner.properties
00:10:43.653  INFO: Project root configuration file: NONE
00:10:43.653  INFO: SonarScanner 4.4.0.2170
00:10:43.653  INFO: Java 1.8.0_261 Oracle Corporation (64-bit)
00:10:43.653  INFO: Windows 10 10.0 amd64
00:10:44.230  INFO: User cache: C:\WINDOWS\system32\config\systemprofile\.sonar\cache
00:10:44.230  INFO: Scanner configuration file: C:\Users\anton\.jenkins\tools\hudson.plugins.sonar.MsBuildSQRunnerInstallation\Sonnar_scanner\sonar-scanner-4.4.0.2170\bin\..\conf\sonar-scanner.properties
00:10:44.230  INFO: Project root configuration file: NONE
00:10:44.230  INFO: Analyzing on SonarQube server 8.5.1
00:10:44.230  INFO: Default locale: "es_ES", source code encoding: "UTF-8"
00:10:44.783  WARN: SonarScanner will require Java 11 to run starting in SonarQube 8.x
00:10:44.784  INFO: Load global settings
00:10:44.784  INFO: Load global settings (done) | time=40ms
00:10:44.784  INFO: Server id: BF41A1F2-AXWnoupqHjnRwWgEnmvK
00:10:44.784  INFO: User cache: C:\WINDOWS\system32\config\systemprofile\.sonar\cache
00:10:44.784  INFO: Load/download plugins
00:10:44.784  INFO: Load plugins index
00:10:44.784  INFO: Load plugins index (done) | time=26ms
00:10:44.784  INFO: Load/download plugins (done) | time=48ms
00:10:45.037  INFO: Process project properties
00:10:45.037  INFO: Process project properties (done) | time=6ms
00:10:45.037  INFO: Execute project builders
00:10:45.037  INFO: Execute project builders (done) | time=1ms
00:10:45.037  INFO: Project key: Boston
00:10:45.037  INFO: Base dir: C:\Users\anton\.jenkins\workspace\Boston
00:10:45.037  INFO: Working dir: C:\Users\anton\.jenkins\workspace\Boston\.scannerwork
00:10:45.301  INFO: Load project settings for component key: 'Boston'
00:10:45.301  INFO: Load project settings for component key: 'Boston' (done) | time=10ms
00:10:45.301  INFO: Load quality profiles
00:10:45.301  INFO: Load quality profiles (done) | time=27ms
00:10:45.301  INFO: Auto-configuring with CI 'Jenkins'
00:10:45.301  INFO: Load active rules
00:10:46.241  INFO: Load active rules (done) | time=787ms
00:10:46.241  INFO: Indexing files...
00:10:46.241  INFO: Project configuration:
00:10:46.241  INFO: 0 files indexed
00:10:46.241  INFO: ------------- Run sensors on module Boston
00:10:46.241  INFO: Load metrics repository
00:10:46.241  INFO: Load metrics repository (done) | time=12ms
00:10:46.807  INFO: Sensor CSS Rules [cssfamily]
00:10:46.807  INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
00:10:46.807  INFO: Sensor CSS Rules [cssfamily] (done) | time=1ms
00:10:46.807  INFO: Sensor JaCoCo XML Report Importer [jacoco]
00:10:46.807  INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
00:10:46.807  INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
00:10:46.807  INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=1ms
00:10:46.807  INFO: Sensor C# Properties [csharp]
00:10:46.807  INFO: Sensor C# Properties [csharp] (done) | time=1ms
00:10:46.807  INFO: Sensor JavaXmlSensor [java]
00:10:46.807  INFO: Sensor JavaXmlSensor [java] (done) | time=0ms
00:10:46.807  INFO: Sensor VB.NET Properties [vbnet]
00:10:46.807  INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
00:10:46.807  INFO: ------------- Run sensors on project
00:10:46.807  INFO: Sensor Zero Coverage Sensor
00:10:46.807  INFO: Sensor Zero Coverage Sensor (done) | time=0ms
00:10:46.807  INFO: SCM Publisher is disabled
00:10:46.807  INFO: CPD Executor Calculating CPD for 0 files
00:10:46.807  INFO: CPD Executor CPD calculation finished (done) | time=0ms
00:10:46.807  INFO: Analysis report generated in 48ms, dir size=82 KB
00:10:46.807  INFO: Analysis report compressed in 10ms, zip size=10 KB
00:10:47.060  INFO: Analysis report uploaded in 26ms
00:10:47.060  INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard?id=Boston
00:10:47.060  INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
00:10:47.060  INFO: More about the report processing at http://localhost:9000/api/ce/task?id=AXWt8eSC9o0F9NdVJGJP
00:10:47.060  INFO: Executing post-job 'Final report'
00:10:47.060  INFO: Turn debug info on to get more details (sonar-scanner -X -Dsonar.verbose=true ...).
00:10:47.060  INFO: Analysis total time: 2.118 s
00:10:47.060  INFO: ------------------------------------------------------------------------
00:10:47.060  INFO: EXECUTION SUCCESS
00:10:47.060  INFO: ------------------------------------------------------------------------
00:10:47.060  INFO: Total time: 3.274s
00:10:47.060  INFO: Final Memory: 21M/549M
00:10:47.060  INFO: ------------------------------------------------------------------------
[Pipeline] }
[Pipeline] // withSonarQubeEnv
[Pipeline] }
[Pipeline] // script
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // timestamps
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS

and I think the main issue is the line where it says Project root configuration file: NONE I have created a sonar-project.properties file in the root folder of my project and it has the following configuration:

sonar.projectKey=Boston
sonar.projectName=Boston
sonar.dotnet.visualStudio.solution=Age3DE.sln
sonar.scm.disabled=true

sonar.sources=./Source
sonar.language=c++
sonar.sourceEncoding=UTF-8

But yet I cannot make it work. I do not know what I am doing wrong, should the sonar-project.properties be set anywhere else?

Hi,

Welcome to the community!

Typically the properties file does go in project root. The key is maybe understanding what analysis thinks project root is. You can use `-Dsonar.scanner.dumpToFile=[file name]" to see all the parameter values analysis is running with, including the root directory. Of course, it might be easier just to ask: does analysis run from the same directory your properties file is located in?

 
Ann

Hi Ann,

Thanks for your reply I have set it on the root folder and I have tried with other simplest prjojects but I always get the same log message “Project root configuration file: None”. I have also tried to pass the values with -D sonar.projectName=… but nothing

I am getting this log with -X parameter if it might help you:

00:00:00.913  Injecting SonarQube environment variables using the configuration: SonarQube2
[Pipeline] {
[Pipeline] bat
00:00:01.203  
00:00:01.203  C:\Users\anton\.jenkins\workspace\Boston>C:\Users\anton\.jenkins\tools\hudson.plugins.sonar.MsBuildSQRunnerInstallation\Sonnar_scanner\sonar-scanner-4.4.0.2170\bin\sonar-scanner.bat -X -Dsonar.projectKey=Test -Dsonar.projectName=Test -Dsonar.sources=. -Dsonar.scm.disabled=true -Dsonar.language=c++ -Dsonar.sourceEncoding=UTF-8 
00:00:01.203  11:26:40.422 INFO: Scanner configuration file: C:\Users\anton\.jenkins\tools\hudson.plugins.sonar.MsBuildSQRunnerInstallation\Sonnar_scanner\sonar-scanner-4.4.0.2170\bin\..\conf\sonar-scanner.properties
00:00:01.203  11:26:40.426 INFO: Project root configuration file: NONE
00:00:01.203  11:26:40.438 INFO: SonarScanner 4.4.0.2170
00:00:01.203  11:26:40.438 INFO: Java 1.8.0_261 Oracle Corporation (64-bit)
00:00:01.203  11:26:40.438 INFO: Windows 10 10.0 amd64
00:00:01.467  11:26:40.533 DEBUG: keyStore is : 
00:00:01.467  11:26:40.533 DEBUG: keyStore type is : jks
00:00:01.467  11:26:40.533 DEBUG: keyStore provider is : 
00:00:01.467  11:26:40.533 DEBUG: init keystore
00:00:01.467  11:26:40.533 DEBUG: init keymanager of type SunX509
00:00:02.044  11:26:41.044 DEBUG: Create: C:\WINDOWS\system32\config\systemprofile\.sonar\cache
00:00:02.044  11:26:41.045 INFO: User cache: C:\WINDOWS\system32\config\systemprofile\.sonar\cache
00:00:02.044  11:26:41.045 DEBUG: Create: C:\WINDOWS\system32\config\systemprofile\.sonar\cache\_tmp
00:00:02.044  11:26:41.047 DEBUG: Extract sonar-scanner-api-batch in temp...
00:00:02.044  11:26:41.051 DEBUG: Get bootstrap index...
00:00:02.044  11:26:41.051 DEBUG: Download: http://localhost:9000/batch/index
00:00:02.044  11:26:41.083 DEBUG: Get bootstrap completed
00:00:02.044  11:26:41.088 DEBUG: Create isolated classloader...
00:00:02.044  11:26:41.094 DEBUG: Start temp cleaning...
00:00:02.044  11:26:41.098 DEBUG: Temp cleaning done
00:00:02.044  11:26:41.098 INFO: Scanner configuration file: C:\Users\anton\.jenkins\tools\hudson.plugins.sonar.MsBuildSQRunnerInstallation\Sonnar_scanner\sonar-scanner-4.4.0.2170\bin\..\conf\sonar-scanner.properties
00:00:02.044  11:26:41.099 INFO: Project root configuration file: NONE
00:00:02.044  11:26:41.099 DEBUG: Execution getVersion
00:00:02.044  11:26:41.101 INFO: Analyzing on SonarQube server 8.5.1
00:00:02.044  11:26:41.102 INFO: Default locale: "es_ES", source code encoding: "UTF-8"
00:00:02.044  11:26:41.102 DEBUG: Work directory: C:\Users\anton\.jenkins\workspace\Boston\.scannerwork
00:00:02.044  11:26:41.103 DEBUG: Execution execute
00:00:02.309  11:26:41.416 WARN: SonarScanner will require Java 11 to run starting in SonarQube 8.x
00:00:02.309  11:26:41.417 DEBUG: Community 8.5.1.38104
00:00:02.309  11:26:41.483 INFO: Load global settings
00:00:02.309  11:26:41.507 DEBUG: GET 200 http://localhost:9000/api/settings/values.protobuf | time=22ms
00:00:02.309  11:26:41.523 INFO: Load global settings (done) | time=40ms
00:00:02.309  11:26:41.524 INFO: Server id: BF41A1F2-AXWnoupqHjnRwWgEnmvK
00:00:02.309  11:26:41.526 INFO: User cache: C:\WINDOWS\system32\config\systemprofile\.sonar\cache
00:00:02.309  11:26:41.528 INFO: Load/download plugins
00:00:02.309  11:26:41.529 INFO: Load plugins index
00:00:02.309  11:26:41.535 DEBUG: GET 200 http://localhost:9000/api/plugins/installed | time=6ms
00:00:02.309  11:26:41.555 INFO: Load plugins index (done) | time=26ms
00:00:02.309  11:26:41.580 INFO: Load/download plugins (done) | time=52ms
00:00:02.575  11:26:41.622 DEBUG: Plugins:
00:00:02.575  11:26:41.622 DEBUG:   * C++ (Community) 1.3.2.1853 (cxx)
00:00:02.575  11:26:41.622 DEBUG:   * Python Code Quality and Security 3.1.0.7619 (python)
00:00:02.575  11:26:41.622 DEBUG:   * CSS Code Quality and Security 1.3.1.1642 (cssfamily)
00:00:02.575  11:26:41.622 DEBUG:   * JaCoCo 1.1.0.898 (jacoco)
00:00:02.575  11:26:41.622 DEBUG:   * SonarGo 1.6.0.719 (go)
00:00:02.575  11:26:41.622 DEBUG:   * SonarKotlin 1.5.0.315 (kotlin)
00:00:02.575  11:26:41.622 DEBUG:   * JavaScript/TypeScript Code Quality and Security 6.5.0.13383 (javascript)
00:00:02.575  11:26:41.622 DEBUG:   * SonarRuby 1.5.0.315 (ruby)
00:00:02.575  11:26:41.622 DEBUG:   * SonarScala 1.5.0.315 (sonarscala)
00:00:02.575  11:26:41.623 DEBUG:   * C# Code Quality and Security 8.13.1.21947 (csharp)
00:00:02.575  11:26:41.623 DEBUG:   * Java Code Quality and Security 6.8.0.23379 (java)
00:00:02.575  11:26:41.623 DEBUG:   * SonarHTML 3.2.0.2082 (web)
00:00:02.575  11:26:41.623 DEBUG:   * SonarFlex 2.5.1.1831 (flex)
00:00:02.575  11:26:41.623 DEBUG:   * SonarXML 2.0.1.2020 (xml)
00:00:02.575  11:26:41.623 DEBUG:   * PHP Code Quality and Security 3.9.0.6331 (php)
00:00:02.575  11:26:41.623 DEBUG:   * VB.NET Code Quality and Security 8.13.1.21947 (vbnet)
00:00:02.838  11:26:41.937 INFO: Process project properties
00:00:02.838  11:26:41.943 INFO: Process project properties (done) | time=6ms
00:00:02.838  11:26:41.943 INFO: Execute project builders
00:00:02.838  11:26:41.943 DEBUG: Execute project builder: org.sonar.plugins.csharp.CSharpGlobalProtobufFileProcessor
00:00:02.838  11:26:41.944 DEBUG: Execute project builder: org.sonar.plugins.vbnet.VbNetGlobalProtobufFileProcessor
00:00:02.838  11:26:41.944 INFO: Execute project builders (done) | time=1ms
00:00:02.838  11:26:41.946 INFO: Project key: Test
00:00:02.838  11:26:41.947 INFO: Base dir: C:\Users\anton\.jenkins\workspace\Boston
00:00:02.838  11:26:41.947 INFO: Working dir: C:\Users\anton\.jenkins\workspace\Boston\.scannerwork
00:00:02.838  11:26:41.947 DEBUG: Project global encoding: UTF-8, default locale: es_ES
00:00:02.838  11:26:41.948 DEBUG: Creating module hierarchy
00:00:02.838  11:26:41.948 DEBUG:   Init module 'Test'
00:00:02.838  11:26:41.949 DEBUG:     Base dir: C:\Users\anton\.jenkins\workspace\Boston
00:00:02.838  11:26:41.949 DEBUG:     Working dir: C:\Users\anton\.jenkins\workspace\Boston\.scannerwork
00:00:02.838  11:26:41.949 DEBUG:     Module global encoding: UTF-8, default locale: es_ES
00:00:02.838  11:26:42.032 INFO: Load project settings for component key: 'Test'
00:00:02.838  11:26:42.046 DEBUG: GET 200 http://localhost:9000/api/settings/values.protobuf?component=Test | time=14ms
00:00:02.838  11:26:42.046 INFO: Load project settings for component key: 'Test' (done) | time=14ms
00:00:02.838  11:26:42.071 DEBUG: Available languages:
00:00:02.838  11:26:42.071 DEBUG:   * C++ (Community) => "c++"
00:00:02.838  11:26:42.072 DEBUG:   * Python => "py"
00:00:02.838  11:26:42.072 DEBUG:   * CSS => "css"
00:00:02.838  11:26:42.072 DEBUG:   * Go => "go"
00:00:02.838  11:26:42.072 DEBUG:   * Kotlin => "kotlin"
00:00:02.838  11:26:42.072 DEBUG:   * JavaScript => "js"
00:00:02.838  11:26:42.072 DEBUG:   * TypeScript => "ts"
00:00:02.838  11:26:42.072 DEBUG:   * Ruby => "ruby"
00:00:02.838  11:26:42.072 DEBUG:   * Scala => "scala"
00:00:02.838  11:26:42.072 DEBUG:   * C# => "cs"
00:00:02.838  11:26:42.072 DEBUG:   * Java => "java"
00:00:02.838  11:26:42.072 DEBUG:   * HTML => "web"
00:00:02.838  11:26:42.072 DEBUG:   * JSP => "jsp"
00:00:02.838  11:26:42.072 DEBUG:   * Flex => "flex"
00:00:02.838  11:26:42.072 DEBUG:   * XML => "xml"
00:00:02.838  11:26:42.072 DEBUG:   * PHP => "php"
00:00:02.838  11:26:42.072 DEBUG:   * VB.NET => "vbnet"
00:00:02.838  11:26:42.076 INFO: Load quality profiles
00:00:02.838  11:26:42.097 DEBUG: GET 200 http://localhost:9000/api/qualityprofiles/search.protobuf?project=Test | time=21ms
00:00:02.838  11:26:42.112 INFO: Load quality profiles (done) | time=36ms
00:00:02.838  11:26:42.118 INFO: Auto-configuring with CI 'Jenkins'
00:00:02.838  11:26:42.125 INFO: Load active rules
00:00:02.838  11:26:42.135 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AXWno0JGHjnRwWgEnsp8&ps=500&p=1 | time=9ms
00:00:03.090  11:26:42.194 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AXWno0F9HjnRwWgEnspk&ps=500&p=1 | time=20ms
00:00:03.090  11:26:42.231 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AXWno0JSHjnRwWgEnsrA&ps=500&p=1 | time=22ms
00:00:03.090  11:26:42.241 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AXWno0NXHjnRwWgEnsrf&ps=500&p=1 | time=7ms
00:00:03.090  11:26:42.262 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AXWno0QdHjnRwWgEnsuB&ps=500&p=1 | time=21ms
00:00:03.090  11:26:42.285 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AXWno0NiHjnRwWgEnssn&ps=500&p=1 | time=21ms
00:00:03.090  11:26:42.342 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AXWno0TSHjnRwWgEnsx3&ps=500&p=1 | time=54ms
00:00:03.341  11:26:42.414 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AXWno0ZsHjnRwWgEns_h&ps=500&p=1 | time=65ms
00:00:03.341  11:26:42.448 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AXWno0b8HjnRwWgEntCo&ps=500&p=1 | time=24ms
00:00:03.341  11:26:42.561 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AXWno0eSHjnRwWgEntK8&ps=500&p=1 | time=111ms
00:00:03.595  11:26:42.760 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AXWno0hWHjnRwWgEntcL&ps=500&p=1 | time=189ms
00:00:03.595  11:26:42.793 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AXWno0j2HjnRwWgEntjn&ps=500&p=1 | time=23ms
00:00:03.595  11:26:42.823 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AXWno0naHjnRwWgEntl6&ps=500&p=1 | time=29ms
00:00:03.595  11:26:42.834 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AXWno0l0HjnRwWgEntkN&ps=500&p=1 | time=10ms
00:00:03.595  11:26:42.893 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AXWno0pCHjnRwWgEntqw&ps=500&p=1 | time=58ms
00:00:03.846  11:26:42.945 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AXWno0uZHjnRwWgEntyf&ps=500&p=1 | time=50ms
00:00:03.846  11:26:42.998 DEBUG: GET 200 http://localhost:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt,updatedAt&activation=true&qprofile=AXWno0wLHjnRwWgEnt29&ps=500&p=1 | time=51ms
00:00:03.846  11:26:43.002 INFO: Load active rules (done) | time=877ms
00:00:03.846  11:26:43.005 DEBUG: SCM Step is disabled by configuration
00:00:03.846  11:26:43.030 DEBUG: Declared extensions of language C++ (Community) were converted to sonar.lang.patterns.c++ : **/*.cxx,**/*.cpp,**/*.cc,**/*.c,**/*.hxx,**/*.hpp,**/*.hh,**/*.h
00:00:03.846  11:26:43.030 DEBUG: Declared extensions of language Python were converted to sonar.lang.patterns.py : **/*.py
00:00:03.846  11:26:43.030 DEBUG: Declared extensions of language CSS were converted to sonar.lang.patterns.css : **/*.css,**/*.less,**/*.scss
00:00:03.846  11:26:43.030 DEBUG: Declared extensions of language Go were converted to sonar.lang.patterns.go : **/*.go
00:00:03.846  11:26:43.030 DEBUG: Declared extensions of language Kotlin were converted to sonar.lang.patterns.kotlin : **/*.kt
00:00:03.846  11:26:43.031 DEBUG: Declared extensions of language JavaScript were converted to sonar.lang.patterns.js : **/*.js,**/*.jsx,**/*.vue
00:00:03.846  11:26:43.031 DEBUG: Declared extensions of language TypeScript were converted to sonar.lang.patterns.ts : **/*.ts,**/*.tsx
00:00:03.846  11:26:43.031 DEBUG: Declared extensions of language Ruby were converted to sonar.lang.patterns.ruby : **/*.rb
00:00:03.846  11:26:43.031 DEBUG: Declared extensions of language Scala were converted to sonar.lang.patterns.scala : **/*.scala
00:00:03.846  11:26:43.031 DEBUG: Declared extensions of language C# were converted to sonar.lang.patterns.cs : **/*.cs
00:00:03.846  11:26:43.031 DEBUG: Declared extensions of language Java were converted to sonar.lang.patterns.java : **/*.java,**/*.jav
00:00:03.846  11:26:43.031 DEBUG: Declared extensions of language HTML were converted to sonar.lang.patterns.web : **/*.html,**/*.xhtml,**/*.cshtml,**/*.vbhtml,**/*.aspx,**/*.ascx,**/*.rhtml,**/*.erb,**/*.shtm,**/*.shtml
00:00:03.846  11:26:43.031 DEBUG: Declared extensions of language JSP were converted to sonar.lang.patterns.jsp : **/*.jsp,**/*.jspf,**/*.jspx
00:00:03.846  11:26:43.031 DEBUG: Declared extensions of language Flex were converted to sonar.lang.patterns.flex : **/*.as
00:00:03.846  11:26:43.032 DEBUG: Declared extensions of language XML were converted to sonar.lang.patterns.xml : **/*.xml,**/*.xsd,**/*.xsl
00:00:03.846  11:26:43.032 DEBUG: Declared extensions of language PHP were converted to sonar.lang.patterns.php : **/*.php,**/*.php3,**/*.php4,**/*.php5,**/*.phtml,**/*.inc
00:00:03.846  11:26:43.032 DEBUG: Declared extensions of language VB.NET were converted to sonar.lang.patterns.vbnet : **/*.vb
00:00:03.846  11:26:43.034 DEBUG: Will ignore generated code
00:00:03.846  11:26:43.035 DEBUG: Will ignore generated code
00:00:03.846  11:26:43.035 INFO: Indexing files...
00:00:03.846  11:26:43.035 INFO: Project configuration:
00:00:03.846  11:26:43.039 INFO: 0 files indexed
00:00:03.846  11:26:43.040 INFO: ------------- Run sensors on module Test
00:00:03.846  11:26:43.090 INFO: Load metrics repository
00:00:03.846  11:26:43.097 DEBUG: GET 200 http://localhost:9000/api/metrics/search?f=name,description,direction,qualitative,custom&ps=500&p=1 | time=7ms
00:00:03.846  11:26:43.104 INFO: Load metrics repository (done) | time=13ms
00:00:04.783  11:26:43.776 DEBUG: 'JavaSquidSensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.776 DEBUG: 'Import external issues report' skipped because one of the required properties is missing
00:00:04.783  11:26:43.777 DEBUG: 'C++ (Community) SquidSensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.777 DEBUG: 'C++ (Community) RatsSensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.777 DEBUG: 'C++ (Community) CppCheckSensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.777 DEBUG: 'C++ (Community) PCLintSensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.778 DEBUG: 'C++ (Community) DrMemorySensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.778 DEBUG: 'C++ (Community) CxxCompilerGccSensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.778 DEBUG: 'C++ (Community) CxxCompilerVcSensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.778 DEBUG: 'C++ (Community) VeraxxSensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.779 DEBUG: 'C++ (Community) ValgrindSensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.779 DEBUG: 'C++ (Community) ClangTidySensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.779 DEBUG: 'C++ (Community) ClangSASensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.779 DEBUG: 'C++ (Community) ExternalRulesSensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.780 DEBUG: 'C++ (Community) CoverageSensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.780 DEBUG: 'Python Sensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.780 DEBUG: 'Cobertura Sensor for Python coverage' skipped because there is no related file in current project
00:00:04.783  11:26:43.781 DEBUG: 'PythonXUnitSensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.782 DEBUG: 'Import of Pylint issues' skipped because there is no related file in current project
00:00:04.783  11:26:43.782 DEBUG: 'Import of Bandit issues' skipped because there is no related file in current project
00:00:04.783  11:26:43.782 DEBUG: 'Import of Flake8 issues' skipped because there is no related file in current project
00:00:04.783  11:26:43.782 DEBUG: 'CSS Metrics' skipped because there is no related file in current project
00:00:04.783  11:26:43.783 DEBUG: 'Import of stylelint issues' skipped because there is no related file in current project
00:00:04.783  11:26:43.783 DEBUG: 'SonarGo' skipped because there is no related file in current project
00:00:04.783  11:26:43.783 DEBUG: 'Go Unit Test Report' skipped because there is no related file in current project
00:00:04.783  11:26:43.783 DEBUG: 'Go Cover sensor for Go coverage' skipped because one of the required properties is missing
00:00:04.783  11:26:43.784 DEBUG: 'Import of go vet issues' skipped because there is no related file in current project
00:00:04.783  11:26:43.784 DEBUG: 'Import of Golint issues' skipped because there is no related file in current project
00:00:04.783  11:26:43.784 DEBUG: 'Import of GoMetaLinter issues' skipped because there is no related file in current project
00:00:04.783  11:26:43.784 DEBUG: 'Import of GolangCI-Lint issues' skipped because there is no related file in current project
00:00:04.783  11:26:43.784 DEBUG: 'Kotlin Sensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.785 DEBUG: 'Import of detekt issues' skipped because there is no related file in current project
00:00:04.783  11:26:43.785 DEBUG: 'Import of Android Lint issues' skipped because one of the required properties is missing
00:00:04.783  11:26:43.785 DEBUG: 'JavaScript analysis' skipped because there is no related file in current project
00:00:04.783  11:26:43.785 DEBUG: 'TypeScript analysis' skipped because there is no related file in current project
00:00:04.783  11:26:43.786 DEBUG: 'JavaScript/TypeScript Coverage' skipped because there is no related file in current project
00:00:04.783  11:26:43.786 DEBUG: 'Import of ESLint issues' skipped because one of the required properties is missing
00:00:04.783  11:26:43.786 DEBUG: 'Import of TSLint issues' skipped because one of the required properties is missing
00:00:04.783  11:26:43.786 DEBUG: 'Ruby Sensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.786 DEBUG: 'Import of RuboCop issues' skipped because one of the required properties is missing
00:00:04.783  11:26:43.786 DEBUG: 'SimpleCov Sensor for Ruby coverage' skipped because there is no related file in current project
00:00:04.783  11:26:43.786 DEBUG: 'Scala Sensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.787 DEBUG: 'Scoverage sensor for Scala coverage' skipped because one of the required properties is missing
00:00:04.783  11:26:43.787 DEBUG: 'Import of Scalastyle issues' skipped because there is no related file in current project
00:00:04.783  11:26:43.787 DEBUG: 'Import of Scapegoat issues' skipped because there is no related file in current project
00:00:04.783  11:26:43.787 DEBUG: 'Import of Checkstyle issues' skipped because there is no related file in current project
00:00:04.783  11:26:43.787 DEBUG: 'Import of PMD issues' skipped because one of the required properties is missing
00:00:04.783  11:26:43.788 DEBUG: 'Import of SpotBugs issues' skipped because there is no related file in current project
00:00:04.783  11:26:43.788 DEBUG: 'SurefireSensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.788 DEBUG: 'Removed properties sensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.788 DEBUG: 'HTML' skipped because there is no related file in current project
00:00:04.783  11:26:43.788 DEBUG: 'Flex' skipped because there is no related file in current project
00:00:04.783  11:26:43.788 DEBUG: 'Flex Cobertura' skipped because there is no related file in current project
00:00:04.783  11:26:43.788 DEBUG: 'XML Sensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.789 DEBUG: 'PHP sensor' skipped because there is no related file in current project
00:00:04.783  11:26:43.789 DEBUG: 'Analyzer for "php.ini" files' skipped because there is no related file in current project
00:00:04.783  11:26:43.791 DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing
00:00:04.783  11:26:43.791 DEBUG: 'C++ (Community) XunitSensor' skipped because one of the required properties is missing
00:00:04.783  11:26:43.791 DEBUG: 'C++ (Community) Unit Test Results Import' skipped because there is no related file in current project
00:00:04.783  11:26:43.791 DEBUG: Sensors : CSS Rules -> JaCoCo XML Report Importer -> C# Properties -> JavaXmlSensor -> VB.NET Properties
00:00:04.783  11:26:43.792 INFO: Sensor CSS Rules [cssfamily]
00:00:04.783  11:26:43.793 INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
00:00:04.783  11:26:43.793 INFO: Sensor CSS Rules [cssfamily] (done) | time=1ms
00:00:04.783  11:26:43.793 INFO: Sensor JaCoCo XML Report Importer [jacoco]
00:00:04.783  11:26:43.794 INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
00:00:04.783  11:26:43.795 INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
00:00:04.783  11:26:43.795 INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=2ms
00:00:04.783  11:26:43.795 INFO: Sensor C# Properties [csharp]
00:00:04.783  11:26:43.795 DEBUG: Project 'Test': Property missing: 'sonar.cs.analyzer.projectOutPaths'. No protobuf files will be loaded for this project.
00:00:04.783  11:26:43.796 DEBUG: Project 'Test': No Roslyn issues reports have been found.
00:00:04.783  11:26:43.796 INFO: Sensor C# Properties [csharp] (done) | time=1ms
00:00:04.783  11:26:43.796 INFO: Sensor JavaXmlSensor [java]
00:00:04.783  11:26:43.796 INFO: Sensor JavaXmlSensor [java] (done) | time=0ms
00:00:04.783  11:26:43.796 INFO: Sensor VB.NET Properties [vbnet]
00:00:04.783  11:26:43.797 DEBUG: Project 'Test': Property missing: 'sonar.vbnet.analyzer.projectOutPaths'. No protobuf files will be loaded for this project.
00:00:04.783  11:26:43.797 DEBUG: Project 'Test': No Roslyn issues reports have been found.
00:00:04.783  11:26:43.797 INFO: Sensor VB.NET Properties [vbnet] (done) | time=1ms
00:00:04.783  11:26:43.800 INFO: ------------- Run sensors on project
00:00:04.783  11:26:43.808 DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing
00:00:04.783  11:26:43.808 DEBUG: 'C#' skipped because there is no related file in current project
00:00:04.783  11:26:43.808 DEBUG: 'C# Tests Coverage Report Import' skipped because there is no related file in current project
00:00:04.783  11:26:43.808 DEBUG: '[Deprecated] C# Integration Tests Coverage Report Import' skipped because there is no related file in current project
00:00:04.783  11:26:43.809 DEBUG: 'C# Unit Test Results Import' skipped because there is no related file in current project
00:00:04.783  11:26:43.809 DEBUG: 'VB.NET' skipped because there is no related file in current project
00:00:04.783  11:26:43.809 DEBUG: 'VB.NET Tests Coverage Report Import' skipped because there is no related file in current project
00:00:04.783  11:26:43.809 DEBUG: '[Deprecated] VB.NET Integration Tests Coverage Report Import' skipped because there is no related file in current project
00:00:04.783  11:26:43.809 DEBUG: 'VB.NET Unit Test Results Import' skipped because there is no related file in current project
00:00:04.783  11:26:43.810 DEBUG: 'Java CPD Block Indexer' skipped because there is no related file in current project
00:00:04.783  11:26:43.810 DEBUG: Sensors : Zero Coverage Sensor
00:00:04.783  11:26:43.810 INFO: Sensor Zero Coverage Sensor
00:00:04.783  11:26:43.810 INFO: Sensor Zero Coverage Sensor (done) | time=0ms
00:00:04.783  11:26:43.811 INFO: SCM Publisher is disabled
00:00:04.783  11:26:43.812 INFO: CPD Executor Calculating CPD for 0 files
00:00:04.783  11:26:43.812 INFO: CPD Executor CPD calculation finished (done) | time=0ms
00:00:04.783  11:26:43.865 INFO: Analysis report generated in 52ms, dir size=82 KB
00:00:04.783  11:26:43.876 INFO: Analysis report compressed in 11ms, zip size=10 KB
00:00:04.783  11:26:43.876 INFO: Analysis report generated in C:\Users\anton\.jenkins\workspace\Boston\.scannerwork\scanner-report
00:00:04.783  11:26:43.876 DEBUG: Upload report
00:00:04.783  11:26:43.904 DEBUG: POST 200 http://localhost:9000/api/ce/submit?projectKey=Test&projectName=Test | time=27ms
00:00:04.783  11:26:43.905 INFO: Analysis report uploaded in 29ms
00:00:04.783  11:26:43.908 DEBUG: Report metadata written to C:\Users\anton\.jenkins\workspace\Boston\.scannerwork\report-task.txt
00:00:04.783  11:26:43.908 INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard?id=Test
00:00:04.783  11:26:43.908 INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
00:00:04.783  11:26:43.908 INFO: More about the report processing at http://localhost:9000/api/ce/task?id=AXW7_kI9-biCFHpn-C-1
00:00:04.784  11:26:43.910 DEBUG: Post-jobs : Final report
00:00:04.784  11:26:43.910 INFO: Executing post-job 'Final report'
00:00:04.784  11:26:43.915 INFO: Analysis total time: 2.280 s
00:00:04.784  11:26:43.916 INFO: ------------------------------------------------------------------------
00:00:04.784  11:26:43.916 INFO: EXECUTION SUCCESS
00:00:04.784  11:26:43.916 INFO: ------------------------------------------------------------------------
00:00:04.784  11:26:43.917 INFO: Total time: 3.517s
00:00:04.784  11:26:43.989 INFO: Final Memory: 21M/542M
00:00:04.784  11:26:43.989 INFO: --------------------

it seems the 0 files indexed message shows that it cannot find the folders from my project but I have tried to run sonar-scanner.bat from the cmd and it seems to work so I do not get why it does not index files when running it from jenkins I have tried with setting “sonar.sources” to “.”
and providing the full path, both works from the cmd but no from Jenkins

Hi,

Your initial post says you’re using MSBuild for compilation. And at least your most recent log indicates that you’re using the vanilla Scanner. You should be using SonarScanner for MSBuild. Have you tried that?

A couple other things here:

  • is there a problem you’re trying to fix, or are you just trying to understand the Project root configuration file: NONE log? Because you seem to be also(?) passing the relevant values on the command line
  • the sonar.language parameter was deprecated for years before it was finally removed late in the 7.x series
  • the community Cxx plugin isn’t supported here. You should direct inquiries about it to that community.

 
Ann

I made it work, I did not have clear about the configuration file. Thanks!