Skip to content

Commit 926deba

Browse files
committed
#609 - Add Mockito as an agent to the build
- add maven surefire plugin with javaagent mockito - add lombok.config to add annotations that will then be ignored by jacoco
1 parent 0f97428 commit 926deba

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

lombok.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
config.stopBubbling = true
2+
lombok.addLombokGeneratedAnnotation = true

pom.xml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
<properties>
2727
<java.version>17</java.version>
28+
<mockito.version>5.19.0</mockito.version>
2829
<mockwebserver.version>5.1.0</mockwebserver.version>
2930
<okhttp3.version>4.10.0</okhttp3.version>
3031
<ontology-tag>v3.8.3</ontology-tag>
@@ -291,7 +292,7 @@
291292
<dependency>
292293
<groupId>org.mockito</groupId>
293294
<artifactId>mockito-core</artifactId>
294-
<version>5.19.0</version>
295+
<version>${mockito.version}</version>
295296
<scope>test</scope>
296297
</dependency>
297298

@@ -396,6 +397,21 @@
396397
<artifactId>spring-boot-maven-plugin</artifactId>
397398
</plugin>
398399

400+
<plugin>
401+
<groupId>org.apache.maven.plugins</groupId>
402+
<artifactId>maven-compiler-plugin</artifactId>
403+
<version>3.11.0</version>
404+
<configuration>
405+
<annotationProcessorPaths>
406+
<path>
407+
<groupId>org.projectlombok</groupId>
408+
<artifactId>lombok</artifactId>
409+
<version>1.18.30</version>
410+
</path>
411+
</annotationProcessorPaths>
412+
</configuration>
413+
</plugin>
414+
399415
<plugin>
400416
<groupId>org.apache.maven.plugins</groupId>
401417
<artifactId>maven-release-plugin</artifactId>
@@ -421,6 +437,17 @@
421437
</executions>
422438
</plugin>
423439

440+
<plugin>
441+
<groupId>org.apache.maven.plugins</groupId>
442+
<artifactId>maven-surefire-plugin</artifactId>
443+
<version>3.5.4</version> <!-- pick an appropriate / latest version -->
444+
<configuration>
445+
<argLine>
446+
-javaagent:${settings.localRepository}/org/mockito/mockito-core/${mockito.version}/mockito-core-${mockito.version}.jar
447+
</argLine>
448+
</configuration>
449+
</plugin>
450+
424451
<plugin>
425452
<groupId>org.jacoco</groupId>
426453
<artifactId>jacoco-maven-plugin</artifactId>

0 commit comments

Comments
 (0)