2

We are using Sonar 5.5 and we have a number of js files in 'resource' folder in a maven structured application. This is not a web application so there is no 'webapp' folder. The js files are bundled in an executable jar file using Spring boot.

I searched everywhere and based on the following link, Sonar already supports multi-language:

Does Sonar support multiple language in same project?

However, it doesn't work in our application. It doesn't seem any special configuration for that to happen.

I made a comment on the above link a while ago but haven't got any answer. I suspect, js files are detected by Sonar only if they are located in 'webapp' folder. I can't find any documentation on this.

We are using maven sonar plugin to analyze the project:

mvn sonar:sonar

Plugins and versions installed:

Git 2.1
C#  5.0
Java 3.13.1
Javascript 2.11
Community
  • 1
  • 1
xbmono
  • 2,084
  • 2
  • 30
  • 50
  • which plugins (with versions) are installed? what is your configuration (for example, have you defined where the sources are located)? – Teryk - SonarSource Sep 28 '16 at 15:55
  • I've updated the post with current plugins... I picked them from "Update Center". This is however, my local machine. We also have a server that has the same issue. The server is SonarQube 6.0 and the plugins are: Javascript 2.16.0.2922 - Java 4.2 - Web 2.4 - Dependency-Check 1.0.3 - CSS 2.1 – xbmono Sep 29 '16 at 05:06
  • Could you provide logs of the analysis as well as its properties (most probably defined in the [pom.xml](http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Maven#AnalyzingwithSonarQubeScannerforMaven-ConfiguringtheSonarQubeAnalysis)) – Elena Vilchik Nov 07 '16 at 09:46

1 Answers1

2

Specify where your sources are located. If you are using Maven, the easiest way is to specify it via -Dsonar.sources=src/main:

mvn -Dsonar.sources=src/main sonar:sonar
Paul Croarkin
  • 14,496
  • 14
  • 79
  • 118