Only pom File Is the Only thing getting analyzed in SC

Hello All,

I really need a hand here. I have been trying with no luck to get a java program via maven into sonarcloud. Please could someone let me know what I have wrong. It seems to find the files and not process them

Here is the YAML file

variables:
  SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar"  # Defines the location of the analysis task cache
  GIT_DEPTH: "0"  # Tells git to fetch all the branches of the project, required by the analysis task
sonarcloud-check:
  image: maven:3.6.3-jdk-11
  cache:
    key: "${CI_JOB_NAME}"
  artifacts:  
    paths:
      - ${CI_PROJECT_DIR}/src
      # - .sonar/cache
  script:
    - mvn verify sonar:sonar
  only:
    - merge_requests
    - master
    - develop

Here is the last lines from the pipe output

Downloaded from central: https://repo.maven.apache.org/maven2/org/sonarsource/scanner/api/sonar-scanner-api/2.14.0.2002/sonar-scanner-api-2.14.0.2002.jar (625 kB at 2.8 MB/s)
[INFO] User cache: /builds/asmgidev/wolc_cms_ui/.sonar/cache
[INFO] SonarQube version: 8.0.0
[INFO] Default locale: "en", source code encoding: "UTF-8" (analysis is platform dependent)
[INFO] Load global settings
[INFO] Load global settings (done) | time=722ms
[INFO] Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
[INFO] User cache: /builds/asmgidev/wolc_cms_ui/.sonar/cache
[INFO] Load/download plugins
[INFO] Load plugins index
[INFO] Load plugins index (done) | time=215ms
[INFO] Load/download plugins (done) | time=25361ms
[INFO] Loaded core extensions: developer-scanner
[INFO] Process project properties
[INFO] Execute project builders
[INFO] Execute project builders (done) | time=8ms
[INFO] Project key: asmgidev_wolc_cms_ui
[INFO] Base dir: /builds/asmgidev/wolc_cms_ui
[INFO] Working dir: /builds/asmgidev/wolc_cms_ui/target/sonar
[INFO] Load project settings for component key: 'asmgidev_wolc_cms_ui'
[INFO] Load project settings for component key: 'asmgidev_wolc_cms_ui' (done) | time=207ms
[INFO] Found an active CI vendor: 'Gitlab CI'
[INFO] Load project branches
[INFO] Load project branches (done) | time=130ms
[INFO] Check ALM binding of project 'asmgidev_wolc_cms_ui'
[INFO] Detected project binding: BOUND
[INFO] Check ALM binding of project 'asmgidev_wolc_cms_ui' (done) | time=117ms
[INFO] Load project pull requests
[INFO] Load project pull requests (done) | time=113ms
[INFO] Load branch configuration
[INFO] Auto-configuring branch develop
[INFO] Load branch configuration (done) | time=12ms
[INFO] Load quality profiles
[INFO] Load quality profiles (done) | time=199ms
[INFO] Load active rules
[INFO] Load active rules (done) | time=3419ms
[INFO] Organization key: asmgidev-1
[INFO] Branch name: develop, type: long living
[INFO] Indexing files...
[INFO] Project configuration:
[INFO] 1 file indexed
[INFO] 0 files ignored because of scm ignore settings
[INFO] Quality profile for xml: Sonar way
[INFO] ------------- Run sensors on module wolc_cms_ui
[INFO] Load metrics repository
[INFO] Load metrics repository (done) | time=125ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/builds/asmgidev/wolc_cms_ui/.sonar/cache/a89f1943fc75b65becd9fb4ecab8d913/sonar-tsql-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Sensor SonarCSS Rules [cssfamily]
[INFO] No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
[INFO] Sensor SonarCSS Rules [cssfamily] (done) | time=11ms
[INFO] Sensor JavaXmlSensor [java]
[INFO] 1 source files to be analyzed
[INFO] Load project repositories
[INFO] Load project repositories (done) | time=125ms
[INFO] 1/1 source files have been analyzed
[INFO] Sensor JavaXmlSensor [java] (done) | time=384ms
[INFO] Sensor HTML [web]
[INFO] Sensor HTML [web] (done) | time=12ms
[INFO] Sensor XML Sensor [xml]
[INFO] 1 source files to be analyzed
[INFO] 1/1 source files have been analyzed
[INFO] Sensor XML Sensor [xml] (done) | time=178ms
[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=14ms
[INFO] Sensor ThymeLeaf template sensor [securityjavafrontend]
[INFO] Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=4ms
[INFO] Sensor JavaSecuritySensor [security]
[INFO] Reading type hierarchy from: /builds/asmgidev/wolc_cms_ui/target/sonar/ucfg2/java
[INFO] Read 0 type definitions
[INFO] Reading UCFGs from: /builds/asmgidev/wolc_cms_ui/target/sonar/ucfg2/java
[INFO] No UCFGs have been included for analysis.
[INFO] Sensor JavaSecuritySensor [security] (done) | time=22ms
[INFO] Sensor CSharpSecuritySensor [security]
[INFO] Reading type hierarchy from: /builds/asmgidev/wolc_cms_ui/target/ucfg_cs2
[INFO] Read 0 type definitions
[INFO] Reading UCFGs from: /builds/asmgidev/wolc_cms_ui/target/ucfg_cs2
[INFO] No UCFGs have been included for analysis.
[INFO] Sensor CSharpSecuritySensor [security] (done) | time=3ms
[INFO] Sensor PhpSecuritySensor [security]
[INFO] Reading type hierarchy from: /builds/asmgidev/wolc_cms_ui/target/sonar/ucfg2/php
[INFO] Read 0 type definitions
[INFO] Reading UCFGs from: /builds/asmgidev/wolc_cms_ui/target/sonar/ucfg2/php
[INFO] No UCFGs have been included for analysis.
[INFO] Sensor PhpSecuritySensor [security] (done) | time=1ms
[INFO] Sensor PythonSecuritySensor [security]
[INFO] Reading type hierarchy from: /builds/asmgidev/wolc_cms_ui/target/sonar/ucfg2/python
[INFO] Read 0 type definitions
[INFO] Reading UCFGs from: /builds/asmgidev/wolc_cms_ui/target/sonar/ucfg2/python
[INFO] No UCFGs have been included for analysis.
[INFO] Sensor PythonSecuritySensor [security] (done) | time=1ms
[INFO] ------------- Run sensors on project
[INFO] Sensor Zero Coverage Sensor
[INFO] Sensor Zero Coverage Sensor (done) | time=3ms
[INFO] CPD Executor Calculating CPD for 0 files
[INFO] CPD Executor CPD calculation finished (done) | time=0ms
[INFO] Analysis report generated in 170ms, dir size=153 KB
[INFO] Analysis report compressed in 24ms, zip size=30 KB
[INFO] Analysis report uploaded in 283ms
[INFO] ANALYSIS SUCCESSFUL, you can find the results at: https://sonarcloud.io/dashboard?id=asmgidev_wolc_cms_ui&branch=develop
[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 https://sonarcloud.io/api/ce/task?id=AXSHvshcm9bJHWilo3Ns
[INFO] Analysis total time: 13.684 s
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  59.998 s
[INFO] Finished at: 2020-09-13T13:54:21Z
[INFO] ------------------------------------------------------------------------
section_end:1600005262:step_script
e[0Ksection_start:1600005262:upload_artifacts_on_success
e[0Ke[0Ke[36;1mUploading artifacts for successful jobe[0;m
e[0;me[32;1mUploading artifacts...e[0;m
/builds/asmgidev/wolc_cms_ui/src: found 3075 matching files and directoriese[0;m 
Uploading artifacts as "archive" to coordinator... oke[0;m  ide[0;m=735204127 responseStatuse[0;m=201 Created tokene[0;m=iPa5RxYr
section_end:1600005266:upload_artifacts_on_success
e[0Ke[32;1mJob succeeded
e[0;m

Anyone?

I looked at the recent analyses of this project, and I see this setting:

sonar.exclusions=**java**

This has the effect of ignoring all java files.

I suggest to review our Narrowing the Focus page in the documentation to find the settings appropriate for you. Please let us know if this solves your issue, or if you need more help.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.