Update pom.xml

Signed-off-by: Mikel Garcia <122596907+mgarciaLKS@users.noreply.github.com>
This commit is contained in:
Mikel Garcia 2025-03-27 16:52:48 +01:00 committed by GitHub
parent 8740f359e8
commit 3e076c95d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

69
pom.xml
View file

@ -250,45 +250,7 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<!-- Agente de JaCoCo para la instrumentación del código -->
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<!-- 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
present at the classpath -->
<plugin>
@ -477,5 +439,36 @@
</pluginManagement>
</build>
</profile>
<profile>
<id>coverage</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.7</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<goals>
<goal>report</goal>
</goals>
<configuration>
<formats>
<format>XML</format>
</formats>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>