where do I have to set the sonar-project.properties file to make sonar work in Jenkins?

2,865 views
Skip to first unread message

jesus fernandez

unread,
Nov 10, 2020, 6:44:44 AM11/10/20
to Jenkins Users
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?

David Karr

unread,
Nov 10, 2020, 2:41:32 PM11/10/20
to jenkins...@googlegroups.com
I believe that the mistake that most people make with running the sonarqube scan from a CI build is TRYING to define a sonarqube properties file. It's best to simply provide all of the required options on the sonar-scanner command line, using "-D".

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f3de3b3c-9ed6-4d8e-b2cb-875ee40db8edn%40googlegroups.com.

jesus fernandez

unread,
Nov 11, 2020, 11:29:54 AM11/11/20
to Jenkins Users
Hi David,

Thanks for your answer but I get the same result when adding the parameters with -D I get the "00:00:01.529 INFO: Project root configuration file: NONE"  message at the beginning of the log. I have tried to create the helloworld simplest c++ project just to test, but I get the same error, what am I missing?

geoffroy...@gmail.com

unread,
Nov 11, 2020, 2:45:45 PM11/11/20
to Jenkins Users
Hello
you should probably ask here: https://community.sonarsource.com/ 
Are you using the paid version of SonarQube, to get C/C++ analysis feature?
Also, from experience, before running any new tool analysis from Jenkins, it is better to first run (and debug) it locally. Sonar scanner local analysis is quite easy to execute, it could help you troubleshoot your issue.
Last, please post your pipeline code so we can check you are properly running the analysis from the source folder actually containing the sonar properties file
Regards

jesus fernandez

unread,
Nov 11, 2020, 4:09:21 PM11/11/20
to Jenkins Users
Thanks Geofrroy for your answer,

I had posted the question in the sonarsource community with no answer already. I am using the free version with the C++ plugin which works fine in many tutorials and videos you can find online. This is my pipeline:
```
pipeline
{   
    agent any
    
    options { timestamps () }
    stages{
        
        stage('Build'){
            steps{
                retry(2){
                    script {
                        bat """
                            "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\MSBuild\\15.0\\Bin\\MSBuild.exe" "C:\\Users\\anton\\source\\repos\\WindowsProject1\\WindowsProject1.sln"
                        """
                    } 
                }
            }
        }
        
      stage('SonarQube analysis') {
            steps{
                script{
                    def scannerHome = tool 'Sonnar_scanner'
                    withSonarQubeEnv('SonarQube2') {
                        bat """
                            ${scannerHome}\\sonar-scanner-4.4.0.2170\\bin\\sonar-scanner.bat -D sonar.projectKey=Test -D sonar.projectName=Test -D sonar.sources=. -D sonar.scm.disabled=true -D sonar.language=c++ -D sonar.sourceEncoding=UTF-8
                        """
                    }
                }
            }
        }
    }
}

```

Thanks!

jesus fernandez

unread,
Nov 11, 2020, 4:13:52 PM11/11/20
to Jenkins Users
and this is the log:
```
00:00:00.901 Injecting SonarQube environment variables using the configuration: SonarQube2 [Pipeline] { [Pipeline] bat 
00:00:01.175 00:00:01.175 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 -D sonar.projectKey=Test -D sonar.projectName=Test -D sonar.sources=. -D sonar.scm.disabled=true -D sonar.language=c++ -D sonar.sourceEncoding=UTF-8 
 00:00:01.175 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.175 INFO: Project root configuration file: NONE 
00:00:01.175 INFO: SonarScanner 4.4.0.2170 
00:00:01.175 INFO: Java 1.8.0_261 Oracle Corporation (64-bit) 
00:00:01.175 INFO: Windows 10 10.0 amd64 
00:00:02.090 INFO: User cache: C:\WINDOWS\system32\config\systemprofile\.sonar\cache 
00:00:02.090 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.090 INFO: Project root configuration file: NONE 
00:00:02.090 INFO: Analyzing on SonarQube server 8.5.1 
00:00:02.090 INFO: Default locale: "es_ES", source code encoding: "UTF-8" 
00:00:02.343 WARN: SonarScanner will require Java 11 to run starting in SonarQube 8.x 00:00:02.343 INFO: Load global settings 
00:00:02.343 INFO: Load global settings (done) | time=42ms 
00:00:02.343 INFO: Server id: BF41A1F2-AXWnoupqHjnRwWgEnmvK 
00:00:02.343 INFO: User cache: C:\WINDOWS\system32\config\systemprofile\.sonar\cache 
00:00:02.343 INFO: Load/download plugins 
00:00:02.343 INFO: Load plugins index 
00:00:02.343 INFO: Load plugins index (done) | time=26ms 
00:00:02.594 INFO: Load/download plugins (done) | time=50ms 
00:00:02.846 INFO: Process project properties 
00:00:02.846 INFO: Process project properties (done) | time=7ms 
00:00:02.846 INFO: Execute project builders 
00:00:02.846 INFO: Execute project builders (done) | time=1ms 
00:00:02.846 INFO: Project key: Test 
00:00:02.846 INFO: Base dir: C:\Users\anton\.jenkins\workspace\Boston 
00:00:02.846 INFO: Working dir: C:\Users\anton\.jenkins\workspace\Boston\.scannerwork 
00:00:03.097 INFO: Load project settings for component key: 'Test' 
00:00:03.097 INFO: Load project settings for component key: 'Test' (done) | time=9ms
00:00:03.097 INFO: Load quality profiles 
00:00:03.097 INFO: Load quality profiles (done) | time=38ms 
00:00:03.097 INFO: Auto-configuring with CI 'Jenkins' 
00:00:03.097 INFO: Load active rules 
00:00:04.011 INFO: Load active rules (done) | time=981ms 
00:00:04.263 INFO: Indexing files... 
00:00:04.263 INFO: Project configuration: 
00:00:04.263 INFO: 0 files indexed 
00:00:04.263 INFO: ------------- Run sensors on module Test 
00:00:04.263 INFO: Load metrics repository 
00:00:04.263 INFO: Load metrics repository (done) | time=13ms 
00:00:05.178 INFO: Sensor CSS Rules [cssfamily] 
00:00:05.178 INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped. 00:00:05.178 INFO: Sensor CSS Rules [cssfamily] (done) | time=1ms
00:00:05.178 INFO: Sensor JaCoCo XML Report Importer [jacoco] 
00:00:05.178 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:05.178 INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer 00:00:05.178 INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=3ms 
00:00:05.178 INFO: Sensor C# Properties [csharp] 
00:00:05.178 INFO: Sensor C# Properties [csharp] (done) | time=2ms 
00:00:05.178 INFO: Sensor JavaXmlSensor [java] 
00:00:05.178 INFO: Sensor JavaXmlSensor [java] (done) | time=1ms 
00:00:05.178 INFO: Sensor VB.NET Properties [vbnet] 
00:00:05.178 INFO: Sensor VB.NET Properties [vbnet] (done) | time=1ms 
00:00:05.178 INFO: ------------- Run sensors on project 
00:00:05.178 INFO: Sensor Zero Coverage Sensor 
00:00:05.178 INFO: Sensor Zero Coverage Sensor (done) | time=0ms 
00:00:05.178 INFO: SCM Publisher is disabled 
00:00:05.178 INFO: CPD Executor Calculating CPD for 0 files 
00:00:05.178 INFO: CPD Executor CPD calculation finished (done) | time=0ms 
00:00:05.178 INFO: Analysis report generated in 58ms, dir size=82 KB 
00:00:05.178 INFO: Analysis report compressed in 14ms, zip size=10 KB 
00:00:05.178 INFO: Analysis report uploaded in 25ms 
00:00:05.178 INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard?id=Test 00:00:05.178 INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report 
00:00:05.178 INFO: More about the report processing at http://localhost:9000/api/ce/task?id=AXW4OGqF0bymGINu8Ui8 
00:00:05.178 INFO: Executing post-job 'Final report'
00:00:05.178 INFO: Turn debug info on to get more details (sonar-scanner -X -Dsonar.verbose=true ...). 
00:00:05.178 INFO: Analysis total time: 2.676 s 
00:00:05.178 INFO: ------------------------------------------------------------------------ 
00:00:05.178 INFO: EXECUTION SUCCESS 
00:00:05.178 INFO: ------------------------------------------------------------------------
00:00:05.178 INFO: Total time: 4.015s 
00:00:05.178 INFO: Final Memory: 24M/545M 
00:00:05.178 INFO: ------------------------------------------------------------------------  
```
But then on the SonarQube UI it says: "The main branch has no lines of code." even though on activity I can see the task has been executed each time I run the pipeline

David Karr

unread,
Nov 11, 2020, 7:00:32 PM11/11/20
to jenkins...@googlegroups.com
I have never seen the "-D" command-line option used with a space between the option and the provided value, and the documentation never shows that example.

Geoffroy J

unread,
Nov 12, 2020, 3:51:20 AM11/12/20
to jenkins...@googlegroups.com
Hello

i would recommend to remove extra-spaces for "-D" options, this is incorrect syntax, and also enable debug mode (-X).

As you are providing information using the scanner option, maybe it is normal to see "Project root configuration file: NONE " log. Maybe setting sonar.projectBaseDir option could help...

Also, sonar-cxx plugin (if this is the one you are trying to use) is not compatible with SonarQube 8.X: https://github.com/SonarOpenCommunity/sonar-cxx/wiki/SonarQube-compatibility-matrix

Regards

You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/SNkp_EATDqw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAA5t8VozS_okxTCqR%3DMQGu_%2BPdyfP9%2BN-Z%3DaFyyLjthTKJ34hA%40mail.gmail.com.
Message has been deleted

jesus fernandez

unread,
Nov 12, 2020, 5:26:26 AM11/12/20
to Jenkins Users
Thanks both for answering, David I have tried both with "-D" with and without spaces. Geoffroy I was running a 8++ version I just downloaded 7.9 but still the same. One question which might be silly (I had used SonarQuebe ever before) does the pipeline needs to pull from a SCM for sonarqube to test the code? I understood it is not necessary at the moment I am just building a c++ project in local and then running the sonarqube step. Is that correct?  

jesus fernandez

unread,
Nov 12, 2020, 5:28:18 AM11/12/20
to Jenkins Users
This is the huge log I get with -X parameter:



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: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.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: --------------------

Richard Bywater

unread,
Nov 12, 2020, 5:47:11 AM11/12/20
to jenkins...@googlegroups.com
I think you've been chasing the wrong issue. The lack of a project root configuration file is normal if everything is configured elsewhere. As far as I can tell you are having issues with no code coverage?

>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

This is probably what you should be looking at - ensuring that your build is output a jacocoTestRepo.xml into the right location. Note that older versions of Sonarqube used to use the Jacoco binary file but newer versions require you to have generated the XML output.

Richard.

Geoffroy J

unread,
Nov 12, 2020, 5:58:07 AM11/12/20
to jenkins...@googlegroups.com
I would have a look here:
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

Seems it is not finding any file to analyse...


jesus fernandez

unread,
Nov 12, 2020, 9:47:24 AM11/12/20
to Jenkins Users
I have noticed that as well, my question is why is not indexing any files... I do not find why, I have tried with the sonar-project.properties in the root folder and adding the arguments with -D, I have tried in 3 different projects and I always get the same result. 

David Karr

unread,
Nov 12, 2020, 9:55:15 AM11/12/20
to jenkins...@googlegroups.com
You would have to look at what directory you're running the scan from, what your "sonar.sources" property is set to, and what your project structure looks like.

Getting correct coverage data is certainly important, but you won't be able to get coverage data if you haven't found any source files.

jesus fernandez

unread,
Nov 12, 2020, 10:17:31 AM11/12/20
to Jenkins Users
Firt of all thanks a lot for taking your time to help me, is rellay aprecciated. That is my test project folder:  

 and this is my sonar-project.properties:


I have also noticed that in Global tool configuration there are 2 tools: "SonnarQube Scanner" and "SonarScanner for MSBuild" I have been using the latest, I changed to the "SonnarQube Scanner" to see if it worked and the I got this error message on the logs:
```
00:00:01.141 00:00:01.141 C:\Users\anton\.jenkins\workspace\Boston>C:\Users\anton\.jenkins\tools\hudson.plugins.sonar.SonarRunnerInstallation\Sonar4\sonar-scanner-4.4.0.2170\bin\sonar-scanner.bat -X -D sonar.projectKey=Test -D sonar.projectName=Test -D sonar.sources=. -D sonar.scm.disabled=true -D sonar.language=c++ -D sonar.sourceEncoding=UTF-8
00:00:01.141 The system cannot find the specified path  
```

Could this be related? I understand for C++ projects I have to use the SonarScanner for MSBuild....

Thanks again!

David Karr

unread,
Nov 12, 2020, 10:20:20 AM11/12/20
to Jenkins Users
Your response doesn't show anything for the "test project folder" or "sonar-project.properties".

Your command line here is again using a space after "-D", so that likely will not work.

jesus fernandez

unread,
Nov 12, 2020, 10:30:31 AM11/12/20
to Jenkins Users
hmmmm it seems images did not get uploaded. This is the project:
project.png


and this is the code of the sonar-project.properties:
```
sonar.projectKey=Test
sonar.projectName=Test
sonar.dotnet.visualStudio.solution=WindowsProject1.sln
sonar.scm.disabled=true

sonar.sources=C:\\Users\\anton\\source\\repos\\WindowsProject1
sonar.language=c++
sonar.sourceEncoding=UTF-8

```

I have tried with the sonar.sources like that or with "." it both works when running sonar-scanner.bat from the cmd. I have tried with and without spaces after the -D and makes no difference, but I will leave it with no spaces to make sure

David Karr

unread,
Nov 12, 2020, 10:47:08 AM11/12/20
to Jenkins Users
Assuming your CURRENT directory is C:/Users/anton/source/repos/WindowsProject1, then just set sonar.sources to ".".

By the way, when you specify paths in java properties files on Windows boxes, you can use "/" instead of "\\".

Show a scan with no space after "-D", with debug enabled, and let's see what the logs say.

jesus fernandez

unread,
Nov 12, 2020, 11:14:15 AM11/12/20
to Jenkins Users
this is using the SonarScanner for MSBuild:

16:37:34  Injecting SonarQube environment variables using the configuration: SonarQube
[Pipeline] {
[Pipeline] bat
16:37:34  
16:37:34  C:\Users\anton\.jenkins\workspace\Boston>C:\Users\anton\.jenkins\tools\hudson.plugins.sonar.MsBuildSQRunnerInstallation\Sonnar_MSBuild\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 
16:37:34  16:37:34.742 INFO: Scanner configuration file: C:\Users\anton\.jenkins\tools\hudson.plugins.sonar.MsBuildSQRunnerInstallation\Sonnar_MSBuild\sonar-scanner-4.4.0.2170\bin\..\conf\sonar-scanner.properties
16:37:34  16:37:34.745 INFO: Project root configuration file: NONE
16:37:34  16:37:34.757 INFO: SonarScanner 4.4.0.2170
16:37:34  16:37:34.758 INFO: Java 1.8.0_261 Oracle Corporation (64-bit)
16:37:34  16:37:34.758 INFO: Windows 10 10.0 amd64
16:37:35  16:37:34.849 DEBUG: keyStore is : 
16:37:35  16:37:34.849 DEBUG: keyStore type is : jks
16:37:35  16:37:34.849 DEBUG: keyStore provider is : 
16:37:35  16:37:34.849 DEBUG: init keystore
16:37:35  16:37:34.850 DEBUG: init keymanager of type SunX509
16:37:35  16:37:35.351 DEBUG: Create: C:\WINDOWS\system32\config\systemprofile\.sonar\cache
16:37:35  16:37:35.351 INFO: User cache: C:\WINDOWS\system32\config\systemprofile\.sonar\cache
16:37:35  16:37:35.351 DEBUG: Create: C:\WINDOWS\system32\config\systemprofile\.sonar\cache\_tmp
16:37:35  16:37:35.353 DEBUG: Extract sonar-scanner-api-batch in temp...
16:37:35  16:37:35.357 DEBUG: Get bootstrap index...
16:37:35  16:37:35.357 DEBUG: Download: http://localhost:9000/batch/index
16:37:35  16:37:35.389 DEBUG: Get bootstrap completed
16:37:35  16:37:35.393 DEBUG: Create isolated classloader...
16:37:35  16:37:35.399 DEBUG: Start temp cleaning...
16:37:35  16:37:35.404 DEBUG: Temp cleaning done
16:37:35  16:37:35.404 INFO: Scanner configuration file: C:\Users\anton\.jenkins\tools\hudson.plugins.sonar.MsBuildSQRunnerInstallation\Sonnar_MSBuild\sonar-scanner-4.4.0.2170\bin\..\conf\sonar-scanner.properties
16:37:35  16:37:35.405 INFO: Project root configuration file: NONE
16:37:35  16:37:35.405 DEBUG: Execution getVersion
16:37:35  16:37:35.407 INFO: Analyzing on SonarQube server 8.5.1
16:37:35  16:37:35.407 INFO: Default locale: "es_ES", source code encoding: "UTF-8"
16:37:35  16:37:35.408 DEBUG: Work directory: C:\Users\anton\.jenkins\workspace\Boston\.scannerwork
16:37:35  16:37:35.409 DEBUG: Execution execute
16:37:35  16:37:35.711 WARN: SonarScanner will require Java 11 to run starting in SonarQube 8.x
16:37:35  16:37:35.712 DEBUG: Community 8.5.1.38104
16:37:35  16:37:35.785 INFO: Load global settings
16:37:35  16:37:35.815 DEBUG: GET 200 http://localhost:9000/api/settings/values.protobuf | time=28ms
16:37:35  16:37:35.833 INFO: Load global settings (done) | time=48ms
16:37:35  16:37:35.834 INFO: Server id: BF41A1F2-AXWnoupqHjnRwWgEnmvK
16:37:35  16:37:35.836 INFO: User cache: C:\WINDOWS\system32\config\systemprofile\.sonar\cache
16:37:35  16:37:35.839 INFO: Load/download plugins
16:37:35  16:37:35.839 INFO: Load plugins index
16:37:35  16:37:35.844 DEBUG: GET 200 http://localhost:9000/api/plugins/installed | time=5ms
16:37:35  16:37:35.864 INFO: Load plugins index (done) | time=25ms
16:37:36  16:37:35.889 INFO: Load/download plugins (done) | time=51ms
16:37:36  16:37:35.931 DEBUG: Plugins:
16:37:36  16:37:35.931 DEBUG:   * C++ (Community) 1.3.2.1853 (cxx)
16:37:36  16:37:35.931 DEBUG:   * Python Code Quality and Security 3.1.0.7619 (python)
16:37:36  16:37:35.931 DEBUG:   * CSS Code Quality and Security 1.3.1.1642 (cssfamily)
16:37:36  16:37:35.931 DEBUG:   * JaCoCo 1.1.0.898 (jacoco)
16:37:36  16:37:35.931 DEBUG:   * SonarGo 1.6.0.719 (go)
16:37:36  16:37:35.932 DEBUG:   * SonarKotlin 1.5.0.315 (kotlin)
16:37:36  16:37:35.932 DEBUG:   * JavaScript/TypeScript Code Quality and Security 6.5.0.13383 (javascript)
16:37:36  16:37:35.932 DEBUG:   * SonarRuby 1.5.0.315 (ruby)
16:37:36  16:37:35.932 DEBUG:   * SonarScala 1.5.0.315 (sonarscala)
16:37:36  16:37:35.932 DEBUG:   * C# Code Quality and Security 8.13.1.21947 (csharp)
16:37:36  16:37:35.932 DEBUG:   * Java Code Quality and Security 6.8.0.23379 (java)
16:37:36  16:37:35.932 DEBUG:   * SonarHTML 3.2.0.2082 (web)
16:37:36  16:37:35.932 DEBUG:   * SonarFlex 2.5.1.1831 (flex)
16:37:36  16:37:35.932 DEBUG:   * SonarXML 2.0.1.2020 (xml)
16:37:36  16:37:35.932 DEBUG:   * PHP Code Quality and Security 3.9.0.6331 (php)
16:37:36  16:37:35.932 DEBUG:   * VB.NET Code Quality and Security 8.13.1.21947 (vbnet)
16:37:36  16:37:36.237 INFO: Process project properties
16:37:36  16:37:36.242 INFO: Process project properties (done) | time=5ms
16:37:36  16:37:36.242 INFO: Execute project builders
16:37:36  16:37:36.243 DEBUG: Execute project builder: org.sonar.plugins.csharp.CSharpGlobalProtobufFileProcessor
16:37:36  16:37:36.243 DEBUG: Execute project builder: org.sonar.plugins.vbnet.VbNetGlobalProtobufFileProcessor
16:37:36  16:37:36.243 INFO: Execute project builders (done) | time=1ms
16:37:36  16:37:36.246 INFO: Project key: Test
16:37:36  16:37:36.246 INFO: Base dir: C:\Users\anton\.jenkins\workspace\Boston
16:37:36  16:37:36.246 INFO: Working dir: C:\Users\anton\.jenkins\workspace\Boston\.scannerwork
16:37:36  16:37:36.246 DEBUG: Project global encoding: UTF-8, default locale: es_ES
16:37:36  16:37:36.247 DEBUG: Creating module hierarchy
16:37:36  16:37:36.247 DEBUG:   Init module 'Test'
16:37:36  16:37:36.248 DEBUG:     Base dir: C:\Users\anton\.jenkins\workspace\Boston
16:37:36  16:37:36.248 DEBUG:     Working dir: C:\Users\anton\.jenkins\workspace\Boston\.scannerwork
16:37:36  16:37:36.248 DEBUG:     Module global encoding: UTF-8, default locale: es_ES
16:37:36  16:37:36.321 INFO: Load project settings for component key: 'Test'
16:37:36  16:37:36.331 DEBUG: GET 200 http://localhost:9000/api/settings/values.protobuf?component=Test | time=10ms
16:37:36  16:37:36.331 INFO: Load project settings for component key: 'Test' (done) | time=10ms
16:37:36  16:37:36.352 DEBUG: Available languages:
16:37:36  16:37:36.352 DEBUG:   * C++ (Community) => "c++"
16:37:36  16:37:36.352 DEBUG:   * Python => "py"
16:37:36  16:37:36.352 DEBUG:   * CSS => "css"
16:37:36  16:37:36.352 DEBUG:   * Go => "go"
16:37:36  16:37:36.352 DEBUG:   * Kotlin => "kotlin"
16:37:36  16:37:36.352 DEBUG:   * JavaScript => "js"
16:37:36  16:37:36.352 DEBUG:   * TypeScript => "ts"
16:37:36  16:37:36.352 DEBUG:   * Ruby => "ruby"
16:37:36  16:37:36.352 DEBUG:   * Scala => "scala"
16:37:36  16:37:36.352 DEBUG:   * C# => "cs"
16:37:36  16:37:36.352 DEBUG:   * Java => "java"
16:37:36  16:37:36.353 DEBUG:   * HTML => "web"
16:37:36  16:37:36.353 DEBUG:   * JSP => "jsp"
16:37:36  16:37:36.353 DEBUG:   * Flex => "flex"
16:37:36  16:37:36.353 DEBUG:   * XML => "xml"
16:37:36  16:37:36.353 DEBUG:   * PHP => "php"
16:37:36  16:37:36.353 DEBUG:   * VB.NET => "vbnet"
16:37:36  16:37:36.355 INFO: Load quality profiles
16:37:36  16:37:36.377 DEBUG: GET 200 http://localhost:9000/api/qualityprofiles/search.protobuf?project=Test | time=21ms
16:37:36  16:37:36.388 INFO: Load quality profiles (done) | time=33ms
16:37:36  16:37:36.392 INFO: Auto-configuring with CI 'Jenkins'
16:37:36  16:37:36.396 INFO: Load active rules
16:37:37  16:37:37.201 INFO: Load active rules (done) | time=805ms
16:37:37  16:37:37.204 DEBUG: SCM Step is disabled by configuration
16:37:37  16:37:37.230 DEBUG: Declared extensions of language C++ (Community) were converted to sonar.lang.patterns.c++ : **/*.cxx,**/*.cpp,**/*.cc,**/*.c,**/*.hxx,**/*.hpp,**/*.hh,**/*.h
16:37:37  16:37:37.231 DEBUG: Declared extensions of language Python were converted to sonar.lang.patterns.py : **/*.py
16:37:37  16:37:37.231 DEBUG: Declared extensions of language CSS were converted to sonar.lang.patterns.css : **/*.css,**/*.less,**/*.scss
16:37:37  16:37:37.231 DEBUG: Declared extensions of language Go were converted to sonar.lang.patterns.go : **/*.go
16:37:37  16:37:37.231 DEBUG: Declared extensions of language Kotlin were converted to sonar.lang.patterns.kotlin : **/*.kt
16:37:37  16:37:37.231 DEBUG: Declared extensions of language JavaScript were converted to sonar.lang.patterns.js : **/*.js,**/*.jsx,**/*.vue
16:37:37  16:37:37.231 DEBUG: Declared extensions of language TypeScript were converted to sonar.lang.patterns.ts : **/*.ts,**/*.tsx
16:37:37  16:37:37.231 DEBUG: Declared extensions of language Ruby were converted to sonar.lang.patterns.ruby : **/*.rb
16:37:37  16:37:37.231 DEBUG: Declared extensions of language Scala were converted to sonar.lang.patterns.scala : **/*.scala
16:37:37  16:37:37.231 DEBUG: Declared extensions of language C# were converted to sonar.lang.patterns.cs : **/*.cs
16:37:37  16:37:37.231 DEBUG: Declared extensions of language Java were converted to sonar.lang.patterns.java : **/*.java,**/*.jav
16:37:37  16:37:37.232 DEBUG: Declared extensions of language HTML were converted to sonar.lang.patterns.web : **/*.html,**/*.xhtml,**/*.cshtml,**/*.vbhtml,**/*.aspx,**/*.ascx,**/*.rhtml,**/*.erb,**/*.shtm,**/*.shtml
16:37:37  16:37:37.232 DEBUG: Declared extensions of language JSP were converted to sonar.lang.patterns.jsp : **/*.jsp,**/*.jspf,**/*.jspx
16:37:37  16:37:37.232 DEBUG: Declared extensions of language Flex were converted to sonar.lang.patterns.flex : **/*.as
16:37:37  16:37:37.232 DEBUG: Declared extensions of language XML were converted to sonar.lang.patterns.xml : **/*.xml,**/*.xsd,**/*.xsl
16:37:37  16:37:37.232 DEBUG: Declared extensions of language PHP were converted to sonar.lang.patterns.php : **/*.php,**/*.php3,**/*.php4,**/*.php5,**/*.phtml,**/*.inc
16:37:37  16:37:37.232 DEBUG: Declared extensions of language VB.NET were converted to sonar.lang.patterns.vbnet : **/*.vb
16:37:37  16:37:37.234 DEBUG: Will ignore generated code
16:37:37  16:37:37.235 DEBUG: Will ignore generated code
16:37:37  16:37:37.235 INFO: Indexing files...
16:37:37  16:37:37.235 INFO: Project configuration:
16:37:37  16:37:37.239 INFO: 0 files indexed
16:37:37  16:37:37.240 INFO: ------------- Run sensors on module Test
16:37:37  16:37:37.287 INFO: Load metrics repository
16:37:37  16:37:37.299 INFO: Load metrics repository (done) | time=12ms
16:37:38  16:37:37.906 DEBUG: 'JavaSquidSensor' skipped because there is no related file in current project
16:37:38  16:37:37.906 DEBUG: 'Import external issues report' skipped because one of the required properties is missing
16:37:38  16:37:37.906 DEBUG: 'C++ (Community) SquidSensor' skipped because there is no related file in current project
16:37:38  16:37:37.907 DEBUG: 'C++ (Community) RatsSensor' skipped because there is no related file in current project
16:37:38  16:37:37.907 DEBUG: 'C++ (Community) CppCheckSensor' skipped because there is no related file in current project
16:37:38  16:37:37.907 DEBUG: 'C++ (Community) PCLintSensor' skipped because there is no related file in current project
16:37:38  16:37:37.907 DEBUG: 'C++ (Community) DrMemorySensor' skipped because there is no related file in current project
16:37:38  16:37:37.908 DEBUG: 'C++ (Community) CxxCompilerGccSensor' skipped because there is no related file in current project
16:37:38  16:37:37.908 DEBUG: 'C++ (Community) CxxCompilerVcSensor' skipped because there is no related file in current project
16:37:38  16:37:37.908 DEBUG: 'C++ (Community) VeraxxSensor' skipped because there is no related file in current project
16:37:38  16:37:37.909 DEBUG: 'C++ (Community) ValgrindSensor' skipped because there is no related file in current project
16:37:38  16:37:37.909 DEBUG: 'C++ (Community) ClangTidySensor' skipped because there is no related file in current project
16:37:38  16:37:37.909 DEBUG: 'C++ (Community) ClangSASensor' skipped because there is no related file in current project
16:37:38  16:37:37.909 DEBUG: 'C++ (Community) ExternalRulesSensor' skipped because there is no related file in current project
16:37:38  16:37:37.910 DEBUG: 'C++ (Community) CoverageSensor' skipped because there is no related file in current project
16:37:38  16:37:37.910 DEBUG: 'Python Sensor' skipped because there is no related file in current project
16:37:38  16:37:37.910 DEBUG: 'Cobertura Sensor for Python coverage' skipped because there is no related file in current project
16:37:38  16:37:37.910 DEBUG: 'PythonXUnitSensor' skipped because there is no related file in current project
16:37:38  16:37:37.911 DEBUG: 'Import of Pylint issues' skipped because there is no related file in current project
16:37:38  16:37:37.911 DEBUG: 'Import of Bandit issues' skipped because there is no related file in current project
16:37:38  16:37:37.911 DEBUG: 'Import of Flake8 issues' skipped because there is no related file in current project
16:37:38  16:37:37.911 DEBUG: 'CSS Metrics' skipped because there is no related file in current project
16:37:38  16:37:37.911 DEBUG: 'Import of stylelint issues' skipped because there is no related file in current project
16:37:38  16:37:37.911 DEBUG: 'SonarGo' skipped because there is no related file in current project
16:37:38  16:37:37.912 DEBUG: 'Go Unit Test Report' skipped because there is no related file in current project
16:37:38  16:37:37.912 DEBUG: 'Go Cover sensor for Go coverage' skipped because one of the required properties is missing
16:37:38  16:37:37.912 DEBUG: 'Import of go vet issues' skipped because there is no related file in current project
16:37:38  16:37:37.912 DEBUG: 'Import of Golint issues' skipped because there is no related file in current project
16:37:38  16:37:37.912 DEBUG: 'Import of GoMetaLinter issues' skipped because there is no related file in current project
16:37:38  16:37:37.913 DEBUG: 'Import of GolangCI-Lint issues' skipped because there is no related file in current project
16:37:38  16:37:37.913 DEBUG: 'Kotlin Sensor' skipped because there is no related file in current project
16:37:38  16:37:37.913 DEBUG: 'Import of detekt issues' skipped because there is no related file in current project
16:37:38  16:37:37.913 DEBUG: 'Import of Android Lint issues' skipped because one of the required properties is missing
16:37:38  16:37:37.913 DEBUG: 'JavaScript analysis' skipped because there is no related file in current project
16:37:38  16:37:37.913 DEBUG: 'TypeScript analysis' skipped because there is no related file in current project
16:37:38  16:37:37.914 DEBUG: 'JavaScript/TypeScript Coverage' skipped because there is no related file in current project
16:37:38  16:37:37.914 DEBUG: 'Import of ESLint issues' skipped because one of the required properties is missing
16:37:38  16:37:37.914 DEBUG: 'Import of TSLint issues' skipped because one of the required properties is missing
16:37:38  16:37:37.914 DEBUG: 'Ruby Sensor' skipped because there is no related file in current project
16:37:38  16:37:37.914 DEBUG: 'Import of RuboCop issues' skipped because one of the required properties is missing
16:37:38  16:37:37.914 DEBUG: 'SimpleCov Sensor for Ruby coverage' skipped because there is no related file in current project
16:37:38  16:37:37.915 DEBUG: 'Scala Sensor' skipped because there is no related file in current project
16:37:38  16:37:37.915 DEBUG: 'Scoverage sensor for Scala coverage' skipped because one of the required properties is missing
16:37:38  16:37:37.915 DEBUG: 'Import of Scalastyle issues' skipped because there is no related file in current project
16:37:38  16:37:37.915 DEBUG: 'Import of Scapegoat issues' skipped because there is no related file in current project
16:37:38  16:37:37.915 DEBUG: 'Import of Checkstyle issues' skipped because there is no related file in current project
16:37:38  16:37:37.916 DEBUG: 'Import of PMD issues' skipped because one of the required properties is missing
16:37:38  16:37:37.916 DEBUG: 'Import of SpotBugs issues' skipped because there is no related file in current project
16:37:38  16:37:37.916 DEBUG: 'SurefireSensor' skipped because there is no related file in current project
16:37:38  16:37:37.916 DEBUG: 'Removed properties sensor' skipped because there is no related file in current project
16:37:38  16:37:37.917 DEBUG: 'HTML' skipped because there is no related file in current project
16:37:38  16:37:37.917 DEBUG: 'Flex' skipped because there is no related file in current project
16:37:38  16:37:37.917 DEBUG: 'Flex Cobertura' skipped because there is no related file in current project
16:37:38  16:37:37.917 DEBUG: 'XML Sensor' skipped because there is no related file in current project
16:37:38  16:37:37.917 DEBUG: 'PHP sensor' skipped because there is no related file in current project
16:37:38  16:37:37.917 DEBUG: 'Analyzer for "php.ini" files' skipped because there is no related file in current project
16:37:38  16:37:37.918 DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing
16:37:38  16:37:37.919 DEBUG: 'C++ (Community) XunitSensor' skipped because one of the required properties is missing
16:37:38  16:37:37.919 DEBUG: 'C++ (Community) Unit Test Results Import' skipped because there is no related file in current project
16:37:38  16:37:37.919 DEBUG: Sensors : CSS Rules -> JaCoCo XML Report Importer -> C# Properties -> JavaXmlSensor -> VB.NET Properties
16:37:38  16:37:37.920 INFO: Sensor CSS Rules [cssfamily]
16:37:38  16:37:37.920 INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
16:37:38  16:37:37.920 INFO: Sensor CSS Rules [cssfamily] (done) | time=1ms
16:37:38  16:37:37.920 INFO: Sensor JaCoCo XML Report Importer [jacoco]
16:37:38  16:37:37.921 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
16:37:38  16:37:37.922 INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
16:37:38  16:37:37.922 INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=2ms
16:37:38  16:37:37.922 INFO: Sensor C# Properties [csharp]
16:37:38  16:37:37.922 DEBUG: Project 'Test': Property missing: 'sonar.cs.analyzer.projectOutPaths'. No protobuf files will be loaded for this project.
16:37:38  16:37:37.923 DEBUG: Project 'Test': No Roslyn issues reports have been found.
16:37:38  16:37:37.923 INFO: Sensor C# Properties [csharp] (done) | time=1ms
16:37:38  16:37:37.923 INFO: Sensor JavaXmlSensor [java]
16:37:38  16:37:37.924 INFO: Sensor JavaXmlSensor [java] (done) | time=1ms
16:37:38  16:37:37.924 INFO: Sensor VB.NET Properties [vbnet]
16:37:38  16:37:37.924 DEBUG: Project 'Test': Property missing: 'sonar.vbnet.analyzer.projectOutPaths'. No protobuf files will be loaded for this project.
16:37:38  16:37:37.924 DEBUG: Project 'Test': No Roslyn issues reports have been found.
16:37:38  16:37:37.924 INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
16:37:38  16:37:37.926 INFO: ------------- Run sensors on project
16:37:38  16:37:37.935 DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing
16:37:38  16:37:37.935 DEBUG: 'C#' skipped because there is no related file in current project
16:37:38  16:37:37.935 DEBUG: 'C# Tests Coverage Report Import' skipped because there is no related file in current project
16:37:38  16:37:37.935 DEBUG: '[Deprecated] C# Integration Tests Coverage Report Import' skipped because there is no related file in current project
16:37:38  16:37:37.935 DEBUG: 'C# Unit Test Results Import' skipped because there is no related file in current project
16:37:38  16:37:37.935 DEBUG: 'VB.NET' skipped because there is no related file in current project
16:37:38  16:37:37.936 DEBUG: 'VB.NET Tests Coverage Report Import' skipped because there is no related file in current project
16:37:38  16:37:37.936 DEBUG: '[Deprecated] VB.NET Integration Tests Coverage Report Import' skipped because there is no related file in current project
16:37:38  16:37:37.936 DEBUG: 'VB.NET Unit Test Results Import' skipped because there is no related file in current project
16:37:38  16:37:37.936 DEBUG: 'Java CPD Block Indexer' skipped because there is no related file in current project
16:37:38  16:37:37.936 DEBUG: Sensors : Zero Coverage Sensor
16:37:38  16:37:37.936 INFO: Sensor Zero Coverage Sensor
16:37:38  16:37:37.936 INFO: Sensor Zero Coverage Sensor (done) | time=0ms
16:37:38  16:37:37.937 INFO: SCM Publisher is disabled
16:37:38  16:37:37.938 INFO: CPD Executor Calculating CPD for 0 files
16:37:38  16:37:37.938 INFO: CPD Executor CPD calculation finished (done) | time=0ms
16:37:38  16:37:37.987 INFO: Analysis report generated in 47ms, dir size=82 KB
16:37:38  16:37:37.997 INFO: Analysis report compressed in 10ms, zip size=10 KB
16:37:38  16:37:37.998 INFO: Analysis report generated in C:\Users\anton\.jenkins\workspace\Boston\.scannerwork\scanner-report
16:37:38  16:37:37.998 DEBUG: Upload report
16:37:38  16:37:38.026 DEBUG: POST 200 http://localhost:9000/api/ce/submit?projectKey=Test&projectName=Test | time=28ms
16:37:38  16:37:38.027 INFO: Analysis report uploaded in 29ms
16:37:38  16:37:38.028 DEBUG: Report metadata written to C:\Users\anton\.jenkins\workspace\Boston\.scannerwork\report-task.txt
16:37:38  16:37:38.029 INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard?id=Test
16:37:38  16:37:38.029 INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
16:37:38  16:37:38.029 INFO: More about the report processing at http://localhost:9000/api/ce/task?id=AXW9GuXn-biCFHpn-C-7
16:37:38  16:37:38.030 DEBUG: Post-jobs : Final report
16:37:38  16:37:38.030 INFO: Executing post-job 'Final report'
16:37:38  16:37:38.035 INFO: Analysis total time: 2.090 s
16:37:38  16:37:38.036 INFO: ------------------------------------------------------------------------
16:37:38  16:37:38.036 INFO: EXECUTION SUCCESS
16:37:38  16:37:38.036 INFO: ------------------------------------------------------------------------
16:37:38  16:37:38.036 INFO: Total time: 3.317s
16:37:38  16:37:38.104 INFO: Final Memory: 21M/542M
16:37:38  16:37:38.104 INFO: ------------------------------------------------------------------------
[Pipeline] }
[Pipeline] // withSonarQubeEnv
[Pipeline] }
[Pipeline] // script
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // timestamps
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS

jesus fernandez

unread,
Nov 12, 2020, 11:15:48 AM11/12/20
to Jenkins Users
and this is if I change it to use the "SonarQube Scanner" tool: 

17:14:28  Injecting SonarQube environment variables using the configuration: SonarQube
[Pipeline] {
[Pipeline] bat
17:14:29  
17:14:29  C:\Users\anton\.jenkins\workspace\Boston>C:\Users\anton\.jenkins\tools\hudson.plugins.sonar.SonarRunnerInstallation\Sonar4\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 
17:14:29  El sistema no puede encontrar la ruta especificada.
[Pipeline] }
[Pipeline] // withSonarQubeEnv
[Pipeline] }
[Pipeline] // script
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // timestamps
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 1
Finished: FAILURE


jesus fernandez

unread,
Nov 12, 2020, 11:28:41 AM11/12/20
to Jenkins Users
ok.... I think I found the error because of being a newbie, the project itself needs to be inside the jenkins workspace folder right? I was using projects which were some other folders...

Geoffroy J

unread,
Nov 12, 2020, 12:07:35 PM11/12/20
to jenkins...@googlegroups.com
setting  sonar.projectBaseDir option to the folder to analyse will probably solve the problem


jesus fernandez

unread,
Nov 13, 2020, 6:07:30 AM11/13/20
to Jenkins Users
it is solved now @geofroy @david thanks a lot for your time!
Reply all
Reply to author
Forward
0 new messages