From 41a134213018920fd3bf3c9f4d68e21c107f4ef7 Mon Sep 17 00:00:00 2001
From: "a.croix" <croix.alexandre@gmail.com>
Date: Fri, 18 Jun 2021 12:45:33 +0200
Subject: [PATCH] Update gitlab-ci to use dependency proxy

---
 .gitlab-ci.yml |  4 ++--
 pom.xml        | 24 ++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bafcf2e..bc5053b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,14 +11,14 @@ include:
 
 test:mvn:jdk8:
   stage: test
-  image: maven:3.6.3-jdk-8
+  image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/maven:3.6.3-jdk-8
   script:
     - mvn clean verify -Dgpg.skip -Dmaven.repo.local=.m2
 
 
 test:mvn:jdk11:
   stage: test
-  image: maven:3.6.3-jdk-11
+  image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/maven:3.6.3-jdk-11
   script:
     - mvn clean verify -Dgpg.skip -Dmaven.repo.local=.m2
 
diff --git a/pom.xml b/pom.xml
index 5c46272..98ab426 100644
--- a/pom.xml
+++ b/pom.xml
@@ -263,6 +263,30 @@
                 </executions>
             </plugin>
 
+            <plugin>
+                <groupId>org.jacoco</groupId>
+                <artifactId>jacoco-maven-plugin</artifactId>
+                <version>0.8.5</version>
+                <executions>
+                    <!-- to avoid bugs in some situations -->
+                    <execution>
+                        <id>default-prepare-agent</id>
+                        <goals>
+                            <goal>prepare-agent</goal>
+                        </goals>
+                    </execution>
+
+                    <!-- create report during maven verify phase -->
+                    <execution>
+                        <id>report</id>
+                        <phase>verify</phase>
+                        <goals>
+                            <goal>report</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
         </plugins>
     </build>
 
-- 
GitLab