Add jacoco parameters

This commit is contained in:
adrian.garcia 2025-03-25 17:08:48 +01:00
parent 6172868068
commit feee952e5e

55
pom.xml
View file

@ -251,25 +251,44 @@
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.jacoco</groupId> <groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId> <artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version> <version>${jacoco.version}</version>
<executions> <executions>
<execution> <!-- Agente de JaCoCo para la instrumentación del código -->
<goals> <execution>
<goal>prepare-agent</goal> <id>prepare-agent</id>
</goals> <goals>
</execution> <goal>prepare-agent</goal>
<execution> </goals>
<id>report</id> </execution>
<goals>
<goal>report</goal>
</goals>
<phase>prepare-package</phase>
</execution>
</executions>
</plugin>
<!-- Generar el informe de cobertura en la fase "verify" para asegurar que se ejecuta después de los tests -->
<execution>
<id>report</id>
<phase>verify</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<outputEncoding>UTF-8</outputEncoding>
</configuration>
</execution>
<!-- Generar el informe en formato XML para SonarQube -->
<execution>
<id>report-aggregate</id>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/site/jacoco</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- Spring Boot Actuator displays build-related information if a git.properties file is <!-- Spring Boot Actuator displays build-related information if a git.properties file is
present at the classpath --> present at the classpath -->
<plugin> <plugin>