Skip to content
Snippets Groups Projects
Commit 413fc87c authored by Emmanuel Bruno's avatar Emmanuel Bruno
Browse files

adds jacoco.

parent fa43d888
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ docker run \
--volume "$(pwd)":/usr/src/mymaven \
--workdir /usr/src/mymaven \
--rm \
--env PUID=$(id -u) -e PGID=$(id -g) \
--env PUID="$(id -u)" -e PGID="$(id -g)" \
--env MAVEN_CONFIG=/var/maven/.m2 \
brunoe/maven:3.6.3-jdk-11-openj9 \
runuser --user user --group user -- mvn -B -e -T 1C -Duser.home=/var/maven --settings /usr/src/mymaven/.github/ci-settings.xml "$@"
\ No newline at end of file
......@@ -118,17 +118,90 @@
</configuration>
</plugin>
<!-- Test d'intégration -->
<!-- Code coverage -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<executions>
<execution>
<id>prepare-unit-tests</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>prepare-integration-tests</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<propertyName>itCoverageAgent</propertyName>
</configuration>
</execution>
<execution>
<id>report-aggregate</id>
<phase>verify</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Unit Tests (UT) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<configuration>
<forkCount>1</forkCount>
<runOrder>random</runOrder>
<argLine>${argLine} -Xms256m -Xmx2048m</argLine>
</configuration>
</plugin>
<!-- Intégration Tests (IT) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M4</version>
<executions>
<execution>
<id>integration-tests</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<reuseForks>true</reuseForks>
<argLine>${itCoverageAgent}</argLine>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M3</version>
<executions>
<execution>
<id>enforce-versions</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.5.4</version>
</requireMavenVersion>
<requireJavaVersion>
<version>1.8</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
......@@ -139,5 +212,7 @@
<jersey.version>3.0.1</jersey.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<sonar.coverage.jacoco.xmlReportPaths>target/site/jacoco/jacoco.xml, target/site/jacoco-it/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>
</project>
......@@ -5,8 +5,6 @@ import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.ext.ExceptionMapper;
import jakarta.ws.rs.ext.Provider;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.experimental.FieldDefaults;
@SuppressWarnings("unused")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment