0 files indexed

731 views
Skip to first unread message

casey...@gmail.com

unread,
May 30, 2017, 8:59:15 AM5/30/17
to SonarQube
Hi All,

Spent hours searching StackOverflow but can't sort this issue.
I have no sonar properties file or sonar properties in pom, all config is done via the sonarqube gui.
Running the docker sonarqube container and running maven sonar:sonar at root of my mean.js project

Enter code here...[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building [tool] JEE6 Project 1.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- sonar-maven-plugin:3.3.0.603:sonar (default-cli) @ tool ---
[INFO] User cache: /home/.sonar/cache
[INFO] Load global settings
[INFO] Load global settings (done) | time=151ms
[INFO] User cache: /home/.sonar/cache
[INFO] Load plugins index
[INFO] Load plugins index (done) | time=7ms
[INFO] SonarQube version: 6.3.1
[INFO] Default locale: "en_IE", source code encoding: "UTF-8"
[INFO] Process project properties
[INFO] Load project repositories
[INFO] Load project repositories (done) | time=150ms
[INFO] Load quality profiles
[INFO] Load quality profiles (done) | time=58ms
[INFO] Load active rules
[INFO] Load active rules (done) | time=349ms
[INFO] Load metrics repository
[INFO] Load metrics repository (done) | time=220ms
[INFO] Publish mode
[INFO] Project key: tool
[INFO] -------------  Scan [tool] JEE6 Project
[INFO] Load server rules
[INFO] Load server rules (done) | time=78ms
[INFO] Initializer GenericCoverageSensor
[INFO] Initializer GenericCoverageSensor (done) | time=0ms
[INFO] Base dir: ...tool
[INFO] Working dir: ...tool/target/sonar
[INFO] Source paths: pom.xml
[INFO] Source encoding: UTF-8, default locale: en_IE
[INFO] Index files
[INFO] Included sources: 
[INFO]   modules/
[INFO] 0 files indexed
[INFO] 1 file ignored because of inclusion/exclusion patterns
[INFO] Sensor Zero Coverage Sensor
[INFO] Sensor Zero Coverage Sensor (done) | time=1ms
[INFO] Sensor Code Colorizer Sensor
[INFO] Sensor Code Colorizer Sensor (done) | time=0ms
[INFO] Sensor CPD Block Indexer
[INFO] Sensor CPD Block Indexer (done) | time=0ms
[INFO] Calculating CPD for 0 files
[INFO] CPD calculation finished
[INFO] Analysis report generated in 103ms, dir size=5 KB
[INFO] Analysis reports compressed in 17ms, zip size=2 KB
[INFO] Analysis report uploaded in 36ms
[INFO] ANALYSIS SUCCESSFUL, you can browse http://172.17.0.2:9000/dashboard/index/tool
[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://172.17.0.2:9000/api/ce/task?id=AVxZVZ3eTkLwRAq-yL36
[INFO] Task total time: 3.062 s
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.224 s
[INFO] Finished at: 2017-05-30T13:30:02+01:00
[INFO] Final Memory: 30M/429M
[INFO] ------------------------------------------------------------------------


and running it with -X i get this.
I can see SonarJS is being used but it doesn't find any of the .js files in our mean project.

[DEBUG] 13:33:50.855 GET 200 http://172.17.0.2:9000/api/settings/values.protobuf | time=78ms
[INFO] 13:33:50.891 Load global settings (done) | time=129ms
[INFO] 13:33:50.908 User cache: /home/.sonar/cache
[INFO] 13:33:51.239 Load plugins index
[DEBUG] 13:33:51.243 GET 200 http://172.17.0.2:9000/deploy/plugins/index.txt | time=2ms
[INFO] 13:33:51.245 Load plugins index (done) | time=6ms
[DEBUG] 13:33:51.246 Load plugins
[DEBUG] 13:33:51.259 Load plugins (done) | time=13ms
[DEBUG] 13:33:51.282 API compatibility mode is enabled on plugin Git [scmgit] (built with API lower than 5.2)
[DEBUG] 13:33:51.444 Plugins:
[DEBUG] 13:33:51.445   * Git 1.2 (scmgit)
[DEBUG] 13:33:51.446   * SonarJS 3.0.0.4962 (javascript)
[DEBUG] 13:33:51.449 Execution getVersion
[INFO] 13:33:51.450 SonarQube version: 6.3.1
[DEBUG] Dependency tree resolution listener events:
[DEBUG] testArtifact: artifact=tool:pom:1.0.1-SNAPSHOT
[DEBUG] includeArtifact: artifact=tool:pom:1.0.1-SNAPSHOT
[DEBUG] startProcessChildren: artifact=tool:pom:1.0.1-SNAPSHOT
[DEBUG] endProcessChildren: artifact=tool:pom:1.0.1-SNAPSHOT
[INFO] 13:33:51.503 Default locale: "en_IE", source code encoding: "UTF-8"
[DEBUG] 13:33:51.505 Work directory: ...tool/target/sonar
[DEBUG] 13:33:51.505 Execution getVersion
[DEBUG] 13:33:51.505 Execution execute
[INFO] 13:33:51.952 Process project properties
[DEBUG] 13:33:51.957 Process project properties (done) | time=5ms
[INFO] 13:33:52.108 Load project repositories
[DEBUG] 13:33:52.152 GET 200 http://172.17.0.2:9000/batch/project.protobuf?key=tool | time=42ms
[INFO] 13:33:52.294 Load project repositories (done) | time=186ms
[DEBUG] 13:33:52.346 Available languages:
[DEBUG] 13:33:52.347   * JavaScript => "js"
[INFO] 13:33:52.355 Load quality profiles
[INFO] 13:33:52.397 Load quality profiles (done) | time=41ms
[INFO] 13:33:52.408 Load active rules
[INFO] 13:33:52.777 Load active rules (done) | time=369ms
[INFO] 13:33:52.780 Load metrics repository
[INFO] 13:33:53.039 Load metrics repository (done) | time=259ms
[INFO] 13:33:53.064 Publish mode
[INFO] 13:33:53.064 Project key: tool
[DEBUG] 13:33:53.065 Start recursive analysis of project modules
[INFO] 13:33:53.069 -------------  Scan [tool] JEE6 Project
[INFO] 13:33:53.401 Load server rules
[DEBUG] 13:33:53.455 GET 200 http://172.17.0.2:9000/api/rules/list.protobuf | time=53ms
[INFO] 13:33:53.471 Load server rules (done) | time=70ms
[DEBUG] 13:33:53.526 Declared extensions of language JavaScript were converted to sonar.lang.patterns.js : **/*.js
[DEBUG] 13:33:53.569 Initializers : GenericCoverageSensor
[INFO] 13:33:53.571 Initializer GenericCoverageSensor
[INFO] 13:33:53.572 Initializer GenericCoverageSensor (done) | time=1ms
[INFO] 13:33:53.572 Base dir: /tool
[INFO] 13:33:53.573 Working dir: /tool/target/sonar
[INFO] 13:33:53.579 Source paths: pom.xml
[INFO] 13:33:53.579 Source encoding: UTF-8, default locale: en_IE
[INFO] 13:33:53.583 Index files
[INFO] 13:33:53.588 Included sources: 
[INFO] 13:33:53.589   modules/
[INFO] 13:33:53.599 0 files indexed
[INFO] 13:33:53.600 1 file ignored because of inclusion/exclusion patterns
[DEBUG] 13:33:53.604 Code colorizer, supported languages: 
[DEBUG] 13:33:54.444 'Generic Coverage Report' skipped because one of the required properties is missing
[DEBUG] 13:33:54.445 'Generic Test Executions Report' skipped because one of the required properties is missing
[DEBUG] 13:33:54.454 'JavaScript Squid Sensor' skipped because there is no related file in current project
[DEBUG] 13:33:54.455 Sensors : Zero Coverage Sensor -> Code Colorizer Sensor -> CPD Block Indexer
[INFO] 13:33:54.455 Sensor Zero Coverage Sensor
[INFO] 13:33:54.455 Sensor Zero Coverage Sensor (done) | time=0ms
[INFO] 13:33:54.456 Sensor Code Colorizer Sensor
[INFO] 13:33:54.456 Sensor Code Colorizer Sensor (done) | time=0ms
[INFO] 13:33:54.456 Sensor CPD Block Indexer
[INFO] 13:33:54.456 Sensor CPD Block Indexer (done) | time=0ms
[INFO] 13:33:54.457 Calculating CPD for 0 files
[INFO] 13:33:54.459 CPD calculation finished
[INFO] 13:33:54.554 Analysis report generated in 94ms, dir size=12 KB
[INFO] 13:33:54.570 Analysis reports compressed in 15ms, zip size=4 KB
[INFO] 13:33:54.571 Analysis report generated in /tool/target/sonar/batch-report
[DEBUG] 13:33:54.571 Upload report
[INFO] 13:33:54.614 Analysis report uploaded in 42ms
[INFO] 13:33:54.616 ANALYSIS SUCCESSFUL, you can browse http://172.17.0.2:9000/dashboard/index/tool
[INFO] 13:33:54.616 Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
[INFO] 13:33:54.617 More about the report processing at http://172.17.0.2:9000/api/ce/task?id=AVxZWSmsTkLwRAq-yL37
[DEBUG] 13:33:54.617 Report metadata written to /tool/target/sonar/report-task.txt
[DEBUG] 13:33:54.620 Post-jobs : 
[INFO] 13:33:54.629 Task total time: 3.114 s
[DEBUG] 13:33:54.630 Execution getVersion
[DEBUG] 13:33:54.631 Execution stop
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.371 s
[INFO] Finished at: 2017-05-30T13:33:54+01:00
[INFO] Final Memory: 31M/432M
[INFO] ------------------------------------------------------------------------

Any help would be appreciated, 
Thanks
Jimmy

nicolas...@sonarsource.com

unread,
May 30, 2017, 9:22:06 AM5/30/17
to SonarQube, casey...@gmail.com
Hey Jimmy,

Just curious: why using the Scanner for Maven ? The latter mainly is targeted at Java Maven projects. If you have a JavaScript project then start simple with the standard SonarQube Scanner, following usage recommendations on SonarJS documentation .

Point it towards your JavaScript sources and things should already get better (keep an eye on that ' Source paths: ' line in the logs).

Best regards,
Nicolas

casey...@gmail.com

unread,
May 30, 2017, 10:06:58 AM5/30/17
to SonarQube, casey...@gmail.com
Hi Nicolas,

Thanks for the reply.
The infrastructure in my company is currently only running sonarqube with maven on jenkins, thats why I tried this way.
Do you think its possilbe to run sonarjs this way or will I have to install SonarQube Scanner on our jenkins servers?

Thanks
Jimmy

nicolas...@sonarsource.com

unread,
May 30, 2017, 10:19:53 AM5/30/17
to SonarQube, casey...@gmail.com
Hi Jimmy,

Well your post here seems like a strong enough indication that you're already struggling (and wasting efforts) in using the wrong tool for the job (if I may say, but the fact is that this is not a Maven project, and that you're using the Scanner for Maven nonetheless).

SonarQube Jenkins integration provides native build steps for running the standard SonarQube Scanner (a.k.a. sonar-scanner) so frankly you should just give it a try. It'll be a much smoother experience, and you should quickly get the results you expect (with your JavaScript sources analysed). :)

Best regards,
Nicolas

Jimmy Casey

unread,
May 30, 2017, 10:23:03 AM5/30/17
to nicolas...@sonarsource.com, SonarQube
Hi Nicholas, 

That's fair enough so.
Thanks for your help.

Jimmy

--
You received this message because you are subscribed to a topic in the Google Groups "SonarQube" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonarqube/bWRW-RVoni8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonarqube+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/b21f93e9-97cc-4507-bd89-0c5f7c3e84c0%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages