Proyecto de maven que no refleja la covertura en sonaqube

Hello excuse me.
I created a maven project in eclipse, the project appears in sonarqube but it does not show me the coverage.

I get errors when I run it.

Can somebody help me?
I’m new at this.

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/hp/.p2/pool/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.16.0.20200610-1735/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/C:/Users/hp/eclipse/java-2020-09/eclipse/configuration/org.eclipse.osgi/5/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/hp/.p2/pool/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.16.0.20200610-1735/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/C:/Users/hp/eclipse/java-2020-09/eclipse/configuration/org.eclipse.osgi/5/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
[INFO] Scanning for projects...
[INFO] 
[INFO] -------------------------< prueba:ejemplo.dos >-------------------------
[INFO] Building ejemplo.dos 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ ejemplo.dos ---
[INFO] Deleting C:\Users\hp\eclipse-workspace\ejemplo.dos\target
[INFO] 
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ ejemplo.dos ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\hp\eclipse-workspace\ejemplo.dos\src\main\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ ejemplo.dos ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\hp\eclipse-workspace\ejemplo.dos\target\classes
[INFO] 
[INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) @ ejemplo.dos ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\hp\eclipse-workspace\ejemplo.dos\src\test\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ ejemplo.dos ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\hp\eclipse-workspace\ejemplo.dos\target\test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ ejemplo.dos ---
[INFO] Surefire report directory: C:\Users\hp\eclipse-workspace\ejemplo.dos\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running prueba.ejemplo.dos.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.024 sec - in prueba.ejemplo.dos.AppTest

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ ejemplo.dos ---
[INFO] Building jar: C:\Users\hp\eclipse-workspace\ejemplo.dos\target\ejemplo.dos-0.0.1-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ ejemplo.dos ---
[INFO] Installing C:\Users\hp\eclipse-workspace\ejemplo.dos\target\ejemplo.dos-0.0.1-SNAPSHOT.jar to C:\Users\hp\.m2\repository\prueba\ejemplo.dos\0.0.1-SNAPSHOT\ejemplo.dos-0.0.1-SNAPSHOT.jar
[INFO] Installing C:\Users\hp\eclipse-workspace\ejemplo.dos\pom.xml to C:\Users\hp\.m2\repository\prueba\ejemplo.dos\0.0.1-SNAPSHOT\ejemplo.dos-0.0.1-SNAPSHOT.pom
[INFO] 
[INFO] -------------------------< prueba:ejemplo.dos >-------------------------
[INFO] Building ejemplo.dos 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- sonar-maven-plugin:3.7.0.1746:sonar (default-cli) @ ejemplo.dos ---
[INFO] User cache: C:\Users\hp\.sonar\cache
[INFO] SonarQube version: 8.4.2
[INFO] Default locale: "es_ES", source code encoding: "UTF-8"
[INFO] Load global settings
[INFO] Load global settings (done) | time=4384ms
[INFO] Server id: BF41A1F2-AXTVforheBdDzolwQywS
[INFO] User cache: C:\Users\hp\.sonar\cache
[INFO] Load/download plugins
[INFO] Load plugins index
[INFO] Load plugins index (done) | time=2460ms
[INFO] Load/download plugins (done) | time=5302ms
[INFO] Process project properties
[INFO] Process project properties (done) | time=1274ms
[INFO] Execute project builders
[INFO] Execute project builders (done) | time=761ms
[INFO] Project key: prueba:ejemplo.dos
[INFO] Base dir: C:\Users\hp\eclipse-workspace\ejemplo.dos
[INFO] Working dir: C:\Users\hp\eclipse-workspace\ejemplo.dos\target\sonar
[INFO] Load project settings for component key: 'prueba:ejemplo.dos'
[INFO] Load project settings for component key: 'prueba:ejemplo.dos' (done) | time=669ms
[INFO] Load quality profiles
[INFO] Load quality profiles (done) | time=4957ms
[INFO] Load active rules
[INFO] Load active rules (done) | time=26622ms
[WARNING] 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] 3 files indexed
[INFO] Quality profile for java: Sonar way
[INFO] Quality profile for xml: Sonar way
[INFO] ------------- Run sensors on module ejemplo.dos
[INFO] Load metrics repository
[INFO] Load metrics repository (done) | time=170ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/C:/Users/hp/.sonar/cache/52f5340dd05620cd162e2b9a45a57124/sonar-javascript-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 JavaSquidSensor [java]
[INFO] Configured Java source version (sonar.java.source): 7
[INFO] JavaClasspath initialization
[WARNING] Bytecode of dependencies was not provided for analysis of source files, you might end up with less precise results. Bytecode can be provided using sonar.java.libraries property.
[INFO] JavaClasspath initialization (done) | time=252ms
[INFO] JavaTestClasspath initialization
[INFO] JavaTestClasspath initialization (done) | time=9ms
[INFO] Java Main Files AST scan
[INFO] 1 source files to be analyzed
[INFO] Load project repositories
[INFO] Load project repositories (done) | time=93ms
[INFO] 0/1 files analyzed, current file: src/main/java/prueba/ejemplo/dos/App.java
[INFO] 1/1 source files have been analyzed
[INFO] Java Main Files AST scan (done) | time=12543ms
[INFO] Java Test Files AST scan
[INFO] 1 source files to be analyzed
[INFO] 1/1 source files have been analyzed
[INFO] Java Test Files AST scan (done) | time=1050ms
[INFO] Java Generated Files AST scan
[INFO] 0 source files to be analyzed
[INFO] Java Generated Files AST scan (done) | time=4ms
[INFO] Sensor JavaSquidSensor [java] (done) | time=15663ms
[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=4ms
[INFO] Sensor JaCoCo XML Report Importer [jacoco]
[INFO] 0/0 source files have been analyzed
[WARNING] No coverage report can be found with sonar.coverage.jacoco.xmlReportPaths='C:\Users\hp\eclipse-workspace\ejemplo.dos/${aggregate.report.dir}'. 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=112ms
[INFO] Sensor SurefireSensor [java]
[INFO] parsing [C:\Users\hp\eclipse-workspace\ejemplo.dos\target\surefire-reports]
[INFO] Sensor SurefireSensor [java] (done) | time=619ms
[INFO] Sensor JavaXmlSensor [java]
[INFO] 1 source files to be analyzed
[INFO] 1/1 source files have been analyzed
[INFO] Sensor JavaXmlSensor [java] (done) | time=3533ms
[INFO] Sensor HTML [web]
[INFO] Sensor HTML [web] (done) | time=25ms
[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=3432ms
[INFO] ------------- Run sensors on project
[INFO] Sensor Zero Coverage Sensor
[INFO] Sensor Zero Coverage Sensor (done) | time=56ms
[INFO] Sensor Java CPD Block Indexer
[INFO] Sensor Java CPD Block Indexer (done) | time=186ms
[INFO] SCM Publisher No SCM system was detected. You can use the 'sonar.scm.provider' property to explicitly specify it.
[INFO] CPD Executor 1 file had no CPD blocks
[INFO] CPD Executor Calculating CPD for 0 files
[INFO] CPD Executor CPD calculation finished (done) | time=0ms
[INFO] Analysis report generated in 997ms, dir size=90 KB
[INFO] Analysis report compressed in 550ms, zip size=16 KB
[INFO] Analysis report uploaded in 245ms
[INFO] ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard?id=prueba%3Aejemplo.dos
[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=AXWRANI4RDJS-RZJ5v7G
[INFO] Analysis total time: 2:26.708 s
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  04:33 min
[INFO] Finished at: 2020-11-03T20:05:51-06:00
[INFO] ------------------------------------------------------------------------

Hi,

Welcome to the community!

Unfortunately, we’re English-only. :frowning_face:

Could you edit your post or reply with an explanation in English?

 
:woman_shrugging:
Ann

Hola @ANA_JESSICA_CERECER!

Welcome to the SonarSource community! Apologies for the late welcome.

As you can tell from the logs, here is the message about coverage:

It looks like your xmlReportPath looks incorrect: the /${aggregate.report.dir} wasn’t substituted with the literal path to the file. Please check this path value and try again.

For reference, please review our Community guide [Coverage & Test Data] Importing JaCoCo coverage report in XML format, which may help you.

If this still doesn’t work, please show the new logs from your Maven sonar-scanner step as you did before.

Joe