Sonarqube is ignoring file because of scm ignore setting and No coverage information will be imported by JaCoCo XML Report Importer - sonarqube

I am new to sonarqube. I did everything according to the documentation and I ran sonar-scanner in my project.
My project is a MERN stack project and this is the structure of that.
This is the execution result.
C:\Users\DEEPIKA\Desktop\Online-Book-Store\Online-Book-Store>sonar-scanner
INFO: Scanner configuration file: C:\Program Files (x86)\sonar-scanner-4.6.2.2472-windows\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.6.2.2472
INFO: Java 11.0.11 AdoptOpenJDK (64-bit)
INFO: Windows 10 10.0 amd64
INFO: User cache: C:\Users\DEEPIKA\.sonar\cache
INFO: Scanner configuration file: C:\Program Files (x86)\sonar-scanner-4.6.2.2472-windows\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: Analyzing on SonarQube server 9.0.0
INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=140ms
INFO: Server id: BF41A1F2-AXwDD18TEpyimEl9r9ai
INFO: User cache: C:\Users\DEEPIKA\.sonar\cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=78ms
INFO: Load/download plugins (done) | time=5968ms
INFO: Process project properties
INFO: Process project properties (done) | time=0ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=0ms
INFO: Project key: SPM_BookStore
INFO: Base dir: C:\Users\DEEPIKA\Desktop\Online-Book-Store\Online-Book-Store
INFO: Working dir: C:\Users\DEEPIKA\Desktop\Online-Book-Store\Online-Book-Store\.scannerwork
INFO: Load project settings for component key: 'SPM_BookStore'
INFO: Load project settings for component key: 'SPM_BookStore' (done) | time=15ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=1062ms
INFO: Load active rules
INFO: Load active rules (done) | time=15385ms
INFO: Indexing files...
INFO: Project configuration:
INFO: 22 files indexed... (last one was backend/models/wishList.model.js)
INFO: 22 files indexed... (last one was backend/models/wishList.model.js)
INFO: 22 files indexed... (last one was backend/models/wishList.model.js)
INFO: 22 files indexed... (last one was backend/models/wishList.model.js)
INFO: 22 files indexed... (last one was backend/models/wishList.model.js)
INFO: 22 files indexed... (last one was backend/models/wishList.model.js)
INFO: 40 files indexed... (last one was frontend/.vscode/launch.json)
INFO: 40 files indexed... (last one was frontend/.vscode/launch.json)
INFO: 40 files indexed... (last one was frontend/.vscode/launch.json)
INFO: 40 files indexed... (last one was frontend/.vscode/launch.json)
INFO: 40 files indexed... (last one was frontend/.vscode/launch.json)
INFO: 40 files indexed... (last one was frontend/.vscode/launch.json)
INFO: 40 files indexed... (last one was frontend/.vscode/launch.json)
INFO: 40 files indexed... (last one was frontend/.vscode/launch.json)
INFO: Load project repositories
INFO: Load project repositories (done) | time=109ms
INFO: 89 files indexed... (last one was frontend/src/components/Admin/Contents/PrivatePolicy/UpdatePrivatePolicy/UpdatePrivatePolicy.jsx)
INFO: 247 files indexed
INFO: 82958 files ignored because of scm ignore settings
INFO: Quality profile for css: Sonar way
INFO: Quality profile for js: Sonar way
INFO: Quality profile for web: Sonar way
INFO: ------------- Run sensors on module SPM_BookStore
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=94ms
INFO: Sensor CSS Metrics [cssfamily]
INFO: Sensor CSS Metrics [cssfamily] (done) | time=656ms
INFO: Sensor CSS Rules [cssfamily]
ERROR: CSS rules were not executed. Error when running: 'node -v'. Is Node.js available during analysis?
org.sonarsource.nodejs.NodeCommandException: Error when running: 'node -v'. Is Node.js available during analysis?
at org.sonarsource.nodejs.NodeCommand.start(NodeCommand.java:81)
at org.sonarsource.nodejs.NodeCommandBuilderImpl.getVersion(NodeCommandBuilderImpl.java:181)
at org.sonarsource.nodejs.NodeCommandBuilderImpl.checkNodeCompatibility(NodeCommandBuilderImpl.java:159)
at org.sonarsource.nodejs.NodeCommandBuilderImpl.build(NodeCommandBuilderImpl.java:134)
at org.sonar.css.plugin.server.CssAnalyzerBridgeServer.initNodeCommand(CssAnalyzerBridgeServer.java:157)
at org.sonar.css.plugin.server.CssAnalyzerBridgeServer.startServer(CssAnalyzerBridgeServer.java:107)
at org.sonar.css.plugin.server.CssAnalyzerBridgeServer.startServerLazily(CssAnalyzerBridgeServer.java:177)
at org.sonar.css.plugin.CssRuleSensor.execute(CssRuleSensor.java:99)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:79)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:382)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:378)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:347)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:136)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.io.IOException: Cannot run program "node": CreateProcess error=2, The system cannot find the file specified
at java.base/java.lang.ProcessBuilder.start(Unknown Source)
at java.base/java.lang.ProcessBuilder.start(Unknown Source)
at org.sonarsource.nodejs.NodeCommand$ProcessWrapperImpl.start(NodeCommand.java:162)
at org.sonarsource.nodejs.NodeCommand.start(NodeCommand.java:77)
... 37 common frames omitted
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.base/java.lang.ProcessImpl.create(Native Method)
at java.base/java.lang.ProcessImpl.<init>(Unknown Source)
at java.base/java.lang.ProcessImpl.start(Unknown Source)
... 41 common frames omitted
INFO: Sensor CSS Rules [cssfamily] (done) | time=148019ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
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
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=15ms
INFO: Sensor JavaScript analysis [javascript]
ERROR: Error when running: 'node -v'. Is Node.js available during analysis?
org.sonarsource.nodejs.NodeCommandException: Error when running: 'node -v'. Is Node.js available during analysis?
at org.sonarsource.nodejs.NodeCommand.start(NodeCommand.java:81)
at
org.sonarsource.nodejs.NodeCommandBuilderImpl.getVersion(NodeCommandBuilderImpl.java:180)
at org.sonarsource.nodejs.NodeCommandBuilderImpl.checkNodeCompatibility(NodeCommandBuilderImpl.java:158)
at org.sonarsource.nodejs.NodeCommandBuilderImpl.build(NodeCommandBuilderImpl.java:133)
at org.sonar.plugins.javascript.eslint.EslintBridgeServerImpl.initNodeCommand(EslintBridgeServerImpl.java:174)
at org.sonar.plugins.javascript.eslint.EslintBridgeServerImpl.startServer(EslintBridgeServerImpl.java:119)
at org.sonar.plugins.javascript.eslint.EslintBridgeServerImpl.startServerLazily(EslintBridgeServerImpl.java:191)
at org.sonar.plugins.javascript.eslint.AbstractEslintSensor.startBridge(AbstractEslintSensor.java:146)
at org.sonar.plugins.javascript.eslint.AbstractEslintSensor.execute(AbstractEslintSensor.java:120)
at org.sonar.plugins.javascript.eslint.JavaScriptEslintBasedSensor.execute(JavaScriptEslintBasedSensor.java:50)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:79)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:382)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:378)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:347)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:136)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.io.IOException: Cannot run program "node": CreateProcess error=2, The system cannot find the file specified
at java.base/java.lang.ProcessBuilder.start(Unknown Source)
at java.base/java.lang.ProcessBuilder.start(Unknown Source)
at org.sonarsource.nodejs.NodeCommand$ProcessWrapperImpl.start(NodeCommand.java:162)
at org.sonarsource.nodejs.NodeCommand.start(NodeCommand.java:77)
... 39 common frames omitted
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.base/java.lang.ProcessImpl.create(Native Method)
at java.base/java.lang.ProcessImpl.<init>(Unknown Source)
at java.base/java.lang.ProcessImpl.start(Unknown Source)
... 43 common frames omitted
INFO: Sensor JavaScript analysis [javascript] (done) | time=77619ms
INFO: Sensor TypeScript analysis [javascript]
INFO: No input files found for analysis
INFO: Sensor TypeScript analysis [javascript] (done) | time=0ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=0ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=0ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=16ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=172ms
INFO: Sensor VB.NET Project Type Information [vbnet]
INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=16ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=0ms
INFO: SCM Publisher SCM provider for this project is: git
INFO: SCM Publisher 225 source files to be analyzed
INFO: 3/225 source files have been analyzed
INFO: 88/225 source files have been analyzed
INFO: SCM Publisher 225/225 source files have been analyzed (done) | time=25200ms
INFO: CPD Executor Calculating CPD for 1 file
INFO: CPD Executor CPD calculation finished (done) | time=62ms
INFO: Analysis report generated in 3397ms, dir size=872.0 kB
INFO: Analysis report compressed in 297ms, zip size=346.1 kB
INFO: Analysis report uploaded in 265ms
INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard?id=SPM_BookStore
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at http://localhost:9000/api/ce/task?id=AHwDV4bimEl9sDRs
INFO: Analysis total time: 15:11.307 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 15:18.712s
INFO: Final Memory: 12M/47M
INFO: ------------------------------------------------------------------------
In the execution file I saw these,
82958 files ignored because of scm ignore settings
INFO: Sensor CSS Rules [cssfamily]
ERROR: CSS rules were not executed. Error when running: 'node -v'. Is Node.js available during analysis?
org.sonarsource.nodejs.NodeCommandException: Error when running: 'node -v'. Is Node.js available during analysis?
at org.sonarsource.nodejs.NodeCommand.start(NodeCommand.java:81)
INFO: Sensor JaCoCo XML Report Importer [jacoco]
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
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=15ms
INFO: Sensor JavaScript analysis [javascript]
ERROR: Error when running: 'node -v'. Is Node.js available during analysis?
org.sonarsource.nodejs.NodeCommandException: Error when running: 'node -v'. Is Node.js available during analysis?
at org.sonarsource.nodejs.NodeCommand.start(NodeCommand.java:81)
I search in google and documentation for the solution but unable to find one. As now JS and nod is not working (check the error) the report is only checking css and html.
Please help me to find the correct issue and how to resolve it?

Related

ERROR: Error during SonarScanner execution

I am trying to scan the source code of this website https://demo.testfire.net/ whose source code is https://github.com/HCL-TECH-SOFTWARE/AltoroJ/tree/master over here.
I don't understand how to do it. I followed some videos but this is the error I am getting. Can someone tell me the steps I need to follow, or point me to any video or blog that can be helpful to do so?
INFO: Scanner configuration file: C:\Users\vansi\Downloads\sonar-scanner-cli-4.6.2.2472-windows\sonar-scanner-4.6.2.2472-windows\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.6.2.2472
INFO: Java 11.0.11 AdoptOpenJDK (64-bit)
INFO: Windows 10 10.0 amd64
INFO: User cache: C:\Users\vansi\.sonar\cache
INFO: Scanner configuration file: C:\Users\vansi\Downloads\sonar-scanner-cli-4.6.2.2472-windows\sonar-scanner-4.6.2.2472-windows\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: Analyzing on SonarQube server 9.1.0
INFO: Default locale: "en_IN", source code encoding: "windows-1252" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=162ms
INFO: Server id: BF41A1F2-AX0zI9epWE89Of-oTW0T
INFO: User cache: C:\Users\vansi\.sonar\cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=95ms
INFO: Load/download plugins (done) | time=309ms
INFO: Process project properties
INFO: Process project properties (done) | time=21ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=2ms
INFO: Project key: Altoro-J
INFO: Base dir: C:\Users\vansi\Downloads\AltoroJ-AltoroJ-3.2 (1)
INFO: Working dir: C:\Users\vansi\Downloads\AltoroJ-AltoroJ-3.2 (1)\.scannerwork
INFO: Load project settings for component key: 'Altoro-J'
INFO: Load project settings for component key: 'Altoro-J' (done) | time=35ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=110ms
INFO: Load active rules
INFO: Load active rules (done) | time=3237ms
WARN: SCM provider autodetection failed. Please use "sonar.scm.provider" to define SCM of your project, or disable the SCM Sensor in the project settings.
INFO: Indexing files...
INFO: Project configuration:
INFO: Load project repositories
INFO: Load project repositories (done) | time=26ms
INFO: 214 files indexed
INFO: Quality profile for css: Sonar way
INFO: Quality profile for java: Sonar way
INFO: Quality profile for js: Sonar way
INFO: Quality profile for jsp: Sonar way
INFO: Quality profile for web: Sonar way
INFO: Quality profile for xml: Sonar way
INFO: ------------- Run sensors on module Altoro-J
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=52ms
INFO: Sensor JavaSensor [java]
INFO: Configured Java source version (sonar.java.source): none
INFO: JavaClasspath initialization
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 11.058s
INFO: Final Memory: 13M/54M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
org.sonar.java.AnalysisException: Your project contains .java files, please provide compiled classes with sonar.java.binaries property, or exclude them from the analysis with sonar.exclusions property.
at org.sonar.java.classpath.ClasspathForMain.init(ClasspathForMain.java:75)
at org.sonar.java.classpath.AbstractClasspath.getElements(AbstractClasspath.java:317)
at org.sonar.java.SonarComponents.getJavaClasspath(SonarComponents.java:175)
at org.sonar.java.JavaFrontend.<init>(JavaFrontend.java:88)
at org.sonar.plugins.java.JavaSensor.execute(JavaSensor.java:108)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:79)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:382)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:378)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:347)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:136)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
The error indicates that you have not provided the java binaries during the sonar execution.
Add the below sonar.properties:
sonar.java.binaries= **/*.java
This will now scan your java binaries. This property is one of the required property if you are going to scan the java code.
More details: https://docs.sonarqube.org/latest/analysis/languages/java/
please sure your container of sonarqube /manuall setup is running on your ip:port (default=9090) and then rebuild using jenkins or your ci/cd tool.
Hope it will work

sonarqube error while execute scan(java.lang.ExceptionInInitializerErrorjava.lang.ExceptionInInitializerError)

when I try to scan my code with sonarqube, I got below errors :
myMac% sonar-scanner
INFO: Scanner configuration file: /usr/local/Cellar/sonar-scanner/4.3.0.2102/libexec/conf/sonar-scanner.properties
INFO: Project root configuration file: /Users/jack/Desktop/XX/Projects/XXXX/Project/sonar-project.properties
INFO: SonarScanner 4.3.0.2102
INFO: Java 13-ea Oracle Corporation (64-bit)
INFO: Mac OS X 10.13.6 x86_64
INFO: User cache: /Users/jack/.sonar/cache
INFO: Scanner configuration file: /usr/local/Cellar/sonar-scanner/4.3.0.2102/libexec/conf/sonar-scanner.properties
INFO: Project root configuration file: ...path/project/sonar-project.properties
INFO: Analyzing on SonarQube server 7.9.4
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Load global settings
INFO: Load global settings (done) | time=87ms
INFO: Server id: BF41A1F2-AXRr6UD6H1saInOfj60W
INFO: User cache: /Users/jzhu321/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load/download plugins (done) | time=70ms
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 1.609s
INFO: Final Memory: 4M/27M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
java.lang.ExceptionInInitializerError
at com.google.gson.internal.reflect.ReflectionAccessor.<clinit>(ReflectionAccessor.java:36)
at com.google.gson.internal.ConstructorConstructor.<init>(ConstructorConstructor.java:51)
at com.google.gson.Gson.<init>(Gson.java:205)
at com.google.gson.Gson.<init>(Gson.java:185)
at org.sonar.scanner.bootstrap.ScannerPluginInstaller.listInstalledPlugins(ScannerPluginInstaller.java:104)
at org.sonar.scanner.bootstrap.ScannerPluginInstaller.loadPlugins(ScannerPluginInstaller.java:76)
at org.sonar.scanner.bootstrap.ScannerPluginInstaller.installRemotes(ScannerPluginInstaller.java:60)
at org.sonar.scanner.bootstrap.ScannerPluginRepository.start(ScannerPluginRepository.java:59)
at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
at org.picocontainer.behaviors.Stored.start(Stored.java:110)
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.NumberFormatException: For input string: "13-ea"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:68)
at java.base/java.lang.Integer.parseInt(Integer.java:658)
at java.base/java.lang.Integer.parseInt(Integer.java:776)
at com.google.gson.util.VersionUtils.determineMajorJavaVersion(VersionUtils.java:28)
at com.google.gson.util.VersionUtils.<clinit>(VersionUtils.java:24)
... 32 more
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
I think maybe the version of my JDK gose wrong ? these erros show no tips or tell how to resolve it, and I have no idea what to do now. can any one helps?
Update:
I upgraded the SonarScanner to the latest version, bug I got some new errors here:
INFO: Scanner configuration file: /usr/local/Cellar/sonar-scanner/4.3.0.2102/libexec/conf/sonar-scanner.properties
INFO: Project root configuration file: /Users/jzhu321/Desktop/PwC/Projects/Risk_Command/RC_UI_NEW/Digital_RC/RC_UI/sonar-project.properties
INFO: SonarScanner 4.4.0.2170
INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
INFO: Mac OS X 10.13.6 x86_64
INFO: User cache: /Users/jzhu321/.sonar/cache
INFO: Scanner configuration file: /usr/local/Cellar/sonar-scanner/4.3.0.2102/libexec/conf/sonar-scanner.properties
INFO: Project root configuration file: /Users/jzhu321/Desktop/PwC/Projects/Risk_Command/RC_UI_NEW/Digital_RC/RC_UI/sonar-project.properties
INFO: Analyzing on SonarQube server 7.9.4
INFO: Default locale: "en_US", source code encoding: "en_US"
INFO: Load global settings
INFO: Load global settings (done) | time=109ms
INFO: Server id: BF41A1F2-AXRsELIlICCBnUbeLAM-
INFO: User cache: /Users/jzhu321/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=89ms
INFO: Load/download plugins (done) | time=251ms
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=3ms
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 2.829s
INFO: Final Memory: 5M/24M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.ProjectLock
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:65)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:678)
at org.sonar.core.platform.ComponentContainer.getComponentByType(ComponentContainer.java:281)
at org.sonar.scanner.scan.ProjectScanContainer.doBeforeStart(ProjectScanContainer.java:153)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:134)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.api.batch.fs.internal.DefaultInputProject
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:65)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:63)
... 22 more
Caused by: java.nio.charset.UnsupportedCharsetException: en_US
at java.base/java.nio.charset.Charset.forName(Unknown Source)
at org.sonar.api.batch.fs.internal.AbstractProjectOrModule.initEncoding(AbstractProjectOrModule.java:76)
at org.sonar.api.batch.fs.internal.AbstractProjectOrModule.<init>(AbstractProjectOrModule.java:69)
at org.sonar.api.batch.fs.internal.DefaultInputProject.<init>(DefaultInputProject.java:37)
at org.sonar.scanner.scan.InputProjectProvider.provide(InputProjectProvider.java:47)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.picocontainer.injectors.MethodInjector.invokeMethod(MethodInjector.java:129)
at org.picocontainer.injectors.MethodInjector.access$000(MethodInjector.java:39)
at org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:113)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:120)
at org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)
at org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)
at org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)
at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:63)
... 36 more
Update2 :
above error is due to the path name , change
sonar.sources=.
to
sonar.sources=./
will solve the problem.
Gson (as a part of Sonar) tried to parse the string 13-ea to an int while trying to find out the java version. According to this thread, this was not supported in March, 2013.
According to this Gson issue the issue was fixed in gson version 2.8.5.
This SonarLint pull request fixd the issue on SonarLint's side by updating Gson. It was merged in April, 2019.
If you look at the SonarLint Release page, you can clearly see that the next version after the merge is 4.3.0.2475 while you use SonarScanner 4.3.0.2102.
Just update Sonar scanner to the latest version and you should be fine.
You can download the latest version of sonar-scanner for MacOS from here
Another option would to just use another non-early-access java version.

SonarQube "The main branch has no lines of code." issue while Jenkins says analysis is successful

I have a maven project which I want to build and scan in Jenkins. It scans the code with SonarQube scanner and uploads the results to my SonarQube server. Jenkins says that everything went successful, however when I then have a look at SonarQube, I see this...
The console output in Jenkins looks like this: (note: I only pasted the last part, not the entire output)
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[JENKINS] Recording test results
[INFO]
[INFO] --- maven-jar-plugin:3.1.2:jar (default-jar) # authentication-service ---
[INFO] Building jar: /var/jenkins_home/workspace/AuthenticationService/microservices/authentication-service/target/authentication-service-0.0.1-SNAPSHOT.jar
[INFO]
[INFO] --- spring-boot-maven-plugin:2.2.4.RELEASE:repackage (repackage) # authentication-service ---
[INFO] Replacing main artifact with repackaged archive
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) # authentication-service ---
[INFO] Installing /var/jenkins_home/workspace/AuthenticationService/microservices/authentication-service/target/authentication-service-0.0.1-SNAPSHOT.jar to /var/jenkins_home/.m2/repository/com/authentication/microservice/authentication-service/0.0.1-SNAPSHOT/authentication-service-0.0.1-SNAPSHOT.jar
[INFO] Installing /var/jenkins_home/workspace/AuthenticationService/microservices/authentication-service/pom.xml to /var/jenkins_home/.m2/repository/com/authentication/microservice/authentication-service/0.0.1-SNAPSHOT/authentication-service-0.0.1-SNAPSHOT.pom
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) # authentication-service ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) # authentication-service ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 14 source files to /var/jenkins_home/workspace/AuthenticationService/microservices/authentication-service/target/classes
[INFO] /var/jenkins_home/workspace/AuthenticationService/microservices/authentication-service/src/main/java/com/authentication/microservice/authenticationservice/helpers/JsonWebTokenGenerator.java: /var/jenkins_home/workspace/AuthenticationService/microservices/authentication-service/src/main/java/com/authentication/microservice/authenticationservice/helpers/JsonWebTokenGenerator.java uses or overrides a deprecated API.
[INFO] /var/jenkins_home/workspace/AuthenticationService/microservices/authentication-service/src/main/java/com/authentication/microservice/authenticationservice/helpers/JsonWebTokenGenerator.java: Recompile with -Xlint:deprecation for details.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:00 min
[INFO] Finished at: 2020-05-22T18:41:07Z
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving /var/jenkins_home/workspace/AuthenticationService/microservices/authentication-service/pom.xml to com.authentication.microservice/authentication-service/0.0.1-SNAPSHOT/authentication-service-0.0.1-SNAPSHOT.pom
channel stopped
[AuthenticationService] $ /var/jenkins_home/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQube_Scanner/bin/sonar-scanner -Dsonar.host.url=http://35.195.88.51 ******** -Dsonar.projectName=AuthenticationService -Dsonar.projectVersion=1.0 -Dsonar.projectKey=com.authentication.microservice:authentication-service -Dsonar.sources=/var/jenkins_home/workspace/AuthenticationService/microservices/authentication-service/target -Dsonar.projectBaseDir=/var/jenkins_home/workspace/AuthenticationService
INFO: Scanner configuration file: /var/jenkins_home/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQube_Scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.3.0.2102
INFO: Java 1.8.0_221 Oracle Corporation (64-bit)
INFO: Linux 4.14.138+ amd64
INFO: User cache: /var/jenkins_home/.sonar/cache
INFO: Scanner configuration file: /var/jenkins_home/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQube_Scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: Analyzing on SonarQube server 7.9.1
INFO: Default locale: "en_US", source code encoding: "US-ASCII" (analysis is platform dependent)
WARN: SonarScanner will require Java 11+ to run starting in SonarQube 8.x
INFO: Load global settings
INFO: Load global settings (done) | time=97ms
INFO: Server id: A7EE8CF2-AXI9JaBwRGaHU4KxYo1w
INFO: User cache: /var/jenkins_home/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=58ms
INFO: Load/download plugins (done) | time=117ms
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=11ms
INFO: Project key: com.authentication.microservice:authentication-service
INFO: Base dir: /var/jenkins_home/workspace/AuthenticationService
INFO: Working dir: /var/jenkins_home/workspace/AuthenticationService/.scannerwork
INFO: Load project settings for component key: 'com.authentication.microservice:authentication-service'
INFO: Load project settings for component key: 'com.authentication.microservice:authentication-service' (done) | time=18ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=57ms
INFO: Detected Jenkins
INFO: Load active rules
INFO: Load active rules (done) | time=724ms
INFO: Indexing files...
INFO: Project configuration:
INFO: 0 files indexed
INFO: 0 files ignored because of scm ignore settings
INFO: ------------- Run sensors on module AuthenticationService
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=41ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=11ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=1ms
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=0ms
INFO: Calculating CPD for 0 files
INFO: CPD calculation finished
INFO: Analysis report generated in 174ms, dir size=72 KB
INFO: Analysis report compressed in 16ms, zip size=9 KB
INFO: Analysis report uploaded in 37ms
INFO: ANALYSIS SUCCESSFUL, you can browse http://35.195.88.51/dashboard?id=com.authentication.microservice%3Aauthentication-service
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at http://35.195.88.51/api/ce/task?id=AXI9sHtMRGaHU4KxYq-d
INFO: Analysis total time: 5.800 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 7.538s
INFO: Final Memory: 13M/33M
INFO: ------------------------------------------------------------------------
Finished: SUCCESS
The SonarQube scanner configuration for this job looks like this:
I have tried different paths for the sonar.sources property, but nothing works. It gives the same result, or gives an error in the Jenkins build.
I am really stuck now, it took me a whole day and I have made no progress. I'd be very grateful if someone could help me, thanks!
Edit: here is the last part of the output when I switch /target for /src in the sonar.sources property:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:02 min
[INFO] Finished at: 2020-05-23T21:34:12Z
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving /var/jenkins_home/workspace/AuthenticationService/microservices/authentication-service/pom.xml to com.authentication.microservice/authentication-service/0.0.1-SNAPSHOT/authentication-service-0.0.1-SNAPSHOT.pom
[JENKINS] Archiving /var/jenkins_home/workspace/AuthenticationService/microservices/authentication-service/target/authentication-service-0.0.1-SNAPSHOT.jar to com.authentication.microservice/authentication-service/0.0.1-SNAPSHOT/authentication-service-0.0.1-SNAPSHOT.jar
channel stopped
[AuthenticationService] $ /var/jenkins_home/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQube_Scanner/bin/sonar-scanner -Dsonar.host.url=http://35.195.88.51 ******** -Dsonar.projectName=AuthenticationService -Dsonar.projectVersion=1.0 -Dsonar.projectKey=com.authentication.microservice:authentication-service -Dsonar.sources=/var/jenkins_home/workspace/AuthenticationService/microservices/authentication-service/src -Dsonar.projectBaseDir=/var/jenkins_home/workspace/AuthenticationService
INFO: Scanner configuration file: /var/jenkins_home/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQube_Scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.3.0.2102
INFO: Java 1.8.0_221 Oracle Corporation (64-bit)
INFO: Linux 4.14.138+ amd64
INFO: User cache: /var/jenkins_home/.sonar/cache
INFO: Scanner configuration file: /var/jenkins_home/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarQube_Scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: Analyzing on SonarQube server 7.9.1
INFO: Default locale: "en_US", source code encoding: "US-ASCII" (analysis is platform dependent)
WARN: SonarScanner will require Java 11+ to run starting in SonarQube 8.x
INFO: Load global settings
INFO: Load global settings (done) | time=186ms
INFO: Server id: A7EE8CF2-AXI9JaBwRGaHU4KxYo1w
INFO: User cache: /var/jenkins_home/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=63ms
INFO: Load/download plugins (done) | time=136ms
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=9ms
INFO: Project key: com.authentication.microservice:authentication-service
INFO: Base dir: /var/jenkins_home/workspace/AuthenticationService
INFO: Working dir: /var/jenkins_home/workspace/AuthenticationService/.scannerwork
INFO: Load project settings for component key: 'com.authentication.microservice:authentication-service'
INFO: Load project settings for component key: 'com.authentication.microservice:authentication-service' (done) | time=83ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=185ms
INFO: Detected Jenkins
INFO: Load active rules
INFO: Load active rules (done) | time=2071ms
INFO: Indexing files...
INFO: Project configuration:
INFO: 16 files indexed
INFO: 0 files ignored because of scm ignore settings
INFO: Quality profile for java: Sonar way
INFO: ------------- Run sensors on module AuthenticationService
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=63ms
INFO: Sensor JavaSquidSensor [java]
INFO: Configured Java source version (sonar.java.source): none
INFO: JavaClasspath initialization
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 9.490s
INFO: Final Memory: 14M/34M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
org.sonar.java.AnalysisException: Please provide compiled classes of your project with sonar.java.binaries property
at org.sonar.java.JavaClasspath.init(JavaClasspath.java:64)
at org.sonar.java.AbstractJavaClasspath.getElements(AbstractJavaClasspath.java:280)
at org.sonar.java.SonarComponents.getJavaClasspath(SonarComponents.java:209)
at org.sonar.java.JavaSquid.<init>(JavaSquid.java:84)
at org.sonar.plugins.java.JavaSquidSensor.execute(JavaSquidSensor.java:87)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:400)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:395)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:358)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeeded?
ERROR: SonarQube scanner exited with non-zero code: 1
Finished: FAILURE
Made it work by adding
sonar.java.binaries=**/target/classes
to the analysis properties of the sonar scanner. I also changed the sonar.sources property to
sonar.sources=microservices/authentication-service/src/main/java/
So the whole analysis properties in my configuration look now like this:
sonar.projectKey=com.authentication.microservice:authentication-service
sonar.projectName=AuthenticationService
sonar.projectVersion=1.0
sonar.sources=microservices/authentication-service/src/main/java/
sonar.java.binaries=**/target/classes
disable lightweight checkout in jenkins job configuration. add checkout scm in scripted pipeline stage. this worked for me

When i am trying to configur sonar in windows i am getting the task execurion error

I am using Sonar-Qube-5.5 and Sonar-Runner-2.4. These are configuration that we have access to use. We need to do the set-up in each and every local system.
Added the logs for reference.
D:\sonar\sonar-runner-2.4\bin>sonar-runner D:\sonar\soanr_ws\FirstSonarProject -X
D:\sonar\sonar-runner-2.4\bin\..
SonarQube Runner 2.4
Java 1.7.0_79 Oracle Corporation (64-bit)
Windows 7 6.1 amd64
INFO: Error stacktraces are turned on.
INFO: Runner configuration file: D:\sonar\sonar-runner-2.4\bin\..\conf\sonar-runner.properties
INFO: Project configuration file: NONE
INFO: SonarQube Server 5.5
09:52:01.484 DEBUG - Publish global mode
09:52:01.562 DEBUG - cache: C:\Users\tcs_ban214.HDFCSLDM\.sonar\ws_cache\http%3A%2F%2Flocalhost%3A9000\global
09:52:01.718 INFO - Load global repositories
09:52:01.781 DEBUG - GET 200 http://localhost:9000/batch/global | time=63ms
09:52:01.859 INFO - Load global repositories (done) | time=141ms
09:52:01.890 INFO - User cache: C:\Users\tcs_ban214.HDFCSLDM\.sonar\cache
09:52:02.217 INFO - Load plugins index
09:52:02.217 DEBUG - GET 200 http://localhost:9000/deploy/plugins/index.txt | time=0ms
09:52:02.217 INFO - Load plugins index (done) | time=0ms
09:52:02.217 DEBUG - Load plugins
09:52:02.249 DEBUG - Load plugins (done) | time=32ms
09:52:02.249 DEBUG - API compatibility mode is enabled on plugin Git [scmgit] (built with API lower than 5.2)
09:52:02.264 DEBUG - API compatibility mode is enabled on plugin JavaScript [javascript] (built with API lower than 5.2)
09:52:02.264 DEBUG - API compatibility mode is enabled on plugin SVN [scmsvn] (built with API lower than 5.2)
09:52:02.264 DEBUG - API compatibility mode is enabled on plugin Java [java] (built with API lower than 5.2)
09:52:02.280 DEBUG - API compatibility mode is enabled on plugin C# [csharp] (built with API lower than 5.2)
09:52:02.373 DEBUG - Plugins:
09:52:02.373 DEBUG - * Git 1.2 (scmgit)
09:52:02.373 DEBUG - * JavaScript 2.11 (javascript)
09:52:02.373 DEBUG - * SVN 1.3 (scmsvn)
09:52:02.373 DEBUG - * Java 3.13.1 (java)
09:52:02.373 DEBUG - * C# 5.0 (csharp)
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 1.732s
Final Memory: 3M/91M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:53)
Caused by: Task 'D:\sonar\soanr_ws\FirstSonarProject' does not exist. Please use 'list' task to see all available tasks.
D:\sonar\sonar-runner-2.4\bin>
You incorrectly executed the sonar-runner tool. You should execute command in directory where your project is located, example:
cd D:\sonar\soanr_ws\FirstSonarProject
D:\sonar\sonar-runner-2.4\bin\sonar-runner -X
Here is a whole documentation about how to execute sonar-runner from command line: http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner

mvn sonar:sonar not generating dashboard data

We use maven for building our projects.
I implemented the configuration mentioned in http://docs.codehaus.org/display/SONAR/Installing+and+Configuring+Maven to analyze the project using sonar.
Snapshot of my .m2/settings.xml
<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<sonar.jdbc.url>jdbc:oracle:thin:#10.207.67.95/XE</sonar.jdbc.url>
<sonar.jdbc.username>sonarqube</sonar.jdbc.username>
<sonar.jdbc.password>sonarqube</sonar.jdbc.password>
<sonar.jdbc.driver>oracle.jdbc.OracleDriver</sonar.jdbc.driver>
<sonar.host.url>http://localhost:9000</sonar.host.url>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
<activeProfile>sonar</activeProfile>
</activeProfiles>
When i run mvn sonar:sonar from the directory containing my pom.xml, it shows build success.
I checked the dashboard, the project shows up, and the LOC shown is empty.
Dashboard shows up no issues.
Output from mvn sonar:sonar
[INFO] ------------------------------------------------------------------------
[INFO] Building xxxx 2.2.0.29-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- sonar-maven-plugin:2.0:sonar (default-cli) # xxxx ---
[INFO] Sonar version: 3.6.2
[INFO] [15:18:16.984] Load batch settings
[INFO] [15:18:17.043] User cache: /home/jsaluja/.sonar/cache
[INFO] [15:18:17.048] Install plugins
[INFO] [15:18:17.589] Install JDBC driver
[INFO] [15:18:17.596] Create JDBC datasource for jdbc:oracle:thin:#10.207.67.95/XE
[INFO] [15:18:19.296] Initializing Hibernate
[INFO] [15:18:21.830] Load project settings
[INFO] [15:18:21.858] Apply project exclusions
[INFO] [15:18:22.003] ------------- Scan xxxx
[INFO] [15:18:22.008] Load module settings
[INFO] [15:18:22.607] Quality profile : [name=Sonar way,language=java]
[INFO] [15:18:22.625] Excluded tests:
[INFO] [15:18:22.625] **/package-info.java
[INFO] [15:18:22.660] Configure Maven plugins
[INFO] [15:18:22.728] Compare to previous analysis (2013-08-08)
[INFO] [15:18:22.750] Compare over 5 days (2013-08-03, analysis of 2013-08-07 12:55:06.0)
[INFO] [15:18:22.763] Compare over 30 days (2013-07-09, analysis of 2013-08-07 12:55:06.0)
[INFO] [15:18:22.890] Base dir: /home/jsaluja/0801/frontend/yyyy/xxxx
[INFO] [15:18:22.890] Working dir: /home/jsaluja/0801/frontend/yyyy/xxxx/target/sonar
[INFO] [15:18:22.890] Binary dirs: /home/jsaluja/0801/frontend/yyyy/xxxx/target/classes
[INFO] [15:18:22.890] Source encoding: UTF-8, default locale: en_US
[INFO] [15:18:22.894] Sensor JavaSourceImporter...
[INFO] [15:18:22.894] Sensor JavaSourceImporter done: 0 ms
[INFO] [15:18:22.894] Sensor JavaSquidSensor...
[INFO] [15:18:22.894] Sensor JavaSquidSensor done: 0 ms
[INFO] [15:18:22.894] Sensor SurefireSensor...
[INFO] [15:18:22.895] parsing /home/jsaluja/0801/frontend/yyyy/xxxx/target/surefire-reports
[INFO] [15:18:22.898] Sensor SurefireSensor done: 4 ms
[INFO] [15:18:22.898] Sensor CpdSensor...
[INFO] [15:18:22.898] SonarEngine is used
[INFO] [15:18:22.898] Sensor CpdSensor done: 0 ms
[INFO] [15:18:22.898] Sensor InitialOpenIssuesSensor...
[INFO] [15:18:22.901] Sensor InitialOpenIssuesSensor done: 3 ms
[INFO] [15:18:22.901] Sensor ProfileSensor...
[INFO] [15:18:23.209] Sensor ProfileSensor done: 308 ms
[INFO] [15:18:23.209] Sensor ProfileEventsSensor...
[INFO] [15:18:23.236] Sensor ProfileEventsSensor done: 27 ms
[INFO] [15:18:23.236] Sensor ProjectLinksSensor...
[INFO] [15:18:23.241] Sensor ProjectLinksSensor done: 5 ms
[INFO] [15:18:23.241] Sensor VersionEventsSensor...
[INFO] [15:18:23.253] Sensor VersionEventsSensor done: 12 ms
[INFO] [15:18:23.253] Sensor Maven dependencies...
[INFO] [15:18:23.805] Sensor Maven dependencies done: 552 ms
[INFO] [15:18:23.805] Sensor JaCoCoSensor...
[INFO] [15:18:23.809] Project coverage is set to 0% since there is no directories with classes.
[INFO] [15:18:23.809] Sensor JaCoCoSensor done: 4 ms
[INFO] [15:18:24.112] Execute decorators...
[INFO] [15:18:24.287] Store results in database
[INFO] [15:18:24.336] ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/a.b.c.d.e:xxxx
[INFO] [15:18:24.337] Executing post-job class org.sonar.plugins.core.issue.notification.SendIssueNotificationsPostJob
[INFO] [15:18:24.337] Executing post-job class org.sonar.plugins.core.batch.IndexProjectPostJob
[INFO] [15:18:24.387] Executing post-job class org.sonar.plugins.dbcleaner.ProjectPurgePostJob
[INFO] [15:18:24.398] -> Keep one snapshot per day between 2013-07-11 and 2013-08-07
[INFO] [15:18:24.400] -> Keep one snapshot per week between 2012-08-09 and 2013-07-11
[INFO] [15:18:24.401] -> Keep one snapshot per month between 2008-08-14 and 2012-08-09
[INFO] [15:18:24.402] -> Delete data prior to: 2008-08-14
[INFO] [15:18:24.404] -> Clean xxxx [id=10080]
[INFO] [15:18:24.409] <- Clean snapshot 13758
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.637s
[INFO] Finished at: Thu Aug 08 15:18:24 EDT 2013
[INFO] Final Memory: 19M/277M
I could independently run sonar runner from the same directory using sonar-project.properties and dashboard shows up data, and a bunch of issues.
Output from sonar runner:
~/sonar-runner-2.3/bin/sonar-runner
SonarQube Runner 2.3
Java 1.6.0_21 Sun Microsystems Inc. (64-bit)
Linux 2.6.18-238.5.1.el5 amd64
INFO: Runner configuration file: /home/jsaluja/sonar-runner-2.3/conf/sonar-runner.properties
INFO: Project configuration file: /home/jsaluja/0801/frontend/yyyy/xxxx/sonar-project.properties
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: /home/jsaluja/0801/frontend/yyyy/xxxx/.sonar
INFO: SonarQube Server 3.6.2
15:19:14.377 INFO - Load batch settings
15:19:14.440 INFO - User cache: /home/jsaluja/.sonar/cache
15:19:14.444 INFO - Install plugins
15:19:14.944 INFO - Install JDBC driver
15:19:14.952 INFO - Create JDBC datasource for jdbc:oracle:thin:#10.207.67.95/XE
15:19:16.300 INFO - Initializing Hibernate
15:19:18.517 INFO - Load project settings
15:19:18.548 INFO - Apply project exclusions
15:19:18.682 INFO - ------------- Scan xxxx
15:19:18.688 INFO - Load module settings
15:19:19.295 INFO - Quality profile : [name=Sonar way,language=java]
15:19:19.314 INFO - Excluded tests:
15:19:19.314 INFO - **/package-info.java
15:19:19.355 INFO - Configure Maven plugins
15:19:19.439 INFO - Compare to previous analysis (2013-08-08)
15:19:19.463 INFO - Compare over 5 days (2013-08-03, analysis of 2013-08-08 14:38:22.472)
15:19:19.478 INFO - Compare over 30 days (2013-07-09, analysis of 2013-08-08 14:38:22.472)
15:19:19.647 INFO - Base dir: /home/jsaluja/0801/frontend/yyyy/xxxx
15:19:19.647 INFO - Working dir: /home/jsaluja/0801/frontend/yyyy/xxxx/.sonar
15:19:19.648 INFO - Source dirs: /home/jsaluja/0801/frontend/yyyy/xxxx/src
15:19:19.648 INFO - Source encoding: UTF-8, default locale: en_US
15:19:19.691 INFO - Sensor JavaSourceImporter...
15:19:20.048 INFO - Sensor JavaSourceImporter done: 357 ms
15:19:20.048 INFO - Sensor JavaSquidSensor...
15:19:20.115 INFO - Java AST scan...
15:19:22.213 INFO - Java AST scan done: 2098 ms
15:19:22.354 INFO - Sensor JavaSquidSensor done: 2306 ms
15:19:22.354 INFO - Sensor SurefireSensor...
15:19:22.355 INFO - parsing /home/jsaluja/0801/frontend/yyyy/xxxx/.sonar/build/surefire-reports
15:19:22.355 INFO - Sensor SurefireSensor done: 1 ms
15:19:22.355 INFO - Sensor CpdSensor...
15:19:22.355 INFO - SonarEngine is used
15:19:22.360 INFO - Cross-project analysis disabled
15:19:22.635 INFO - Sensor CpdSensor done: 280 ms
15:19:22.636 INFO - Sensor CheckstyleSensor...
15:19:22.637 INFO - Execute Checkstyle 5.6...
15:19:22.648 INFO - Checkstyle configuration: /home/jsaluja/0801/frontend/yyyy/xxxx/.sonar/checkstyle.xml
15:19:23.990 INFO - Execute Checkstyle 5.6 done: 1353 ms
15:19:24.001 INFO - Sensor CheckstyleSensor done: 1365 ms
15:19:24.001 INFO - Sensor PmdSensor...
15:19:24.004 INFO - Execute PMD 4.3...
15:19:24.024 INFO - Java version: 1.5
15:19:24.066 INFO - PMD configuration: /home/jsaluja/0801/frontend/yyyy/xxxx/.sonar/pmd.xml
15:19:27.017 INFO - Execute PMD 4.3 done: 3013 ms
15:19:27.110 INFO - Sensor PmdSensor done: 3109 ms
15:19:27.110 INFO - Sensor InitialOpenIssuesSensor...
15:19:27.363 INFO - Sensor InitialOpenIssuesSensor done: 253 ms
15:19:27.363 INFO - Sensor ProfileSensor...
15:19:27.638 INFO - Sensor ProfileSensor done: 275 ms
15:19:27.638 INFO - Sensor ProfileEventsSensor...
15:19:27.654 INFO - Sensor ProfileEventsSensor done: 16 ms
15:19:27.655 INFO - Sensor ProjectLinksSensor...
15:19:27.660 INFO - Sensor ProjectLinksSensor done: 5 ms
15:19:27.660 INFO - Sensor VersionEventsSensor...
15:19:27.674 INFO - Sensor VersionEventsSensor done: 14 ms
15:19:27.674 INFO - Sensor JaCoCoSensor...
15:19:27.677 INFO - Project coverage is set to 0% since there is no directories with classes.
15:19:27.677 INFO - Sensor JaCoCoSensor done: 3 ms
15:19:28.164 INFO - Execute decorators...
15:19:31.041 INFO - Store results in database
15:19:31.214 INFO - ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/a.b.c.d.xxxx
15:19:31.216 INFO - Executing post-job class org.sonar.plugins.core.issue.notification.SendIssueNotificationsPostJob
15:19:31.230 INFO - Executing post-job class org.sonar.plugins.core.batch.IndexProjectPostJob
15:19:31.279 INFO - Executing post-job class org.sonar.plugins.dbcleaner.ProjectPurgePostJob
15:19:31.288 INFO - -> Keep one snapshot per day between 2013-07-11 and 2013-08-07
15:19:31.289 INFO - -> Keep one snapshot per week between 2012-08-09 and 2013-07-11
15:19:31.289 INFO - -> Keep one snapshot per month between 2008-08-14 and 2012-08-09
15:19:31.289 INFO - -> Delete data prior to: 2008-08-14
15:19:31.292 INFO - -> Clean xxxx [id=11882]
15:19:31.296 INFO - <- Clean snapshot 13716
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
Total time: 17.946s
Final Memory: 20M/732M
INFO: --------------------------------------------
The dashboard screenshot for the mvn and sonar runner executed for the same project
https://docs.google.com/file/d/0B2TK6N3XnvavRmdrX0ZYb2V3Q0k/edit?usp=sharing
Red one shows output for mvn - no LOC
Green one shows output for sonar runner - LOC and issues identified
What am i missing with mvn configuration ?
It seems that sonar does not find any class files
15:19:27.677 INFO - Project coverage is set to 0% since there is no directories with classes.
Did you run
mvn clean install -DskipTests
before mvn sonar:sonar as recommended? mvn sonar:sonar will not compile the source code anymore (I think since sonar 3.6).

Resources