Skip to content

Commit 6b104b4

Browse files
committed
#609 - Add Mockito as an agent to the build
- add maven surefire plugin with javaagent mockito
1 parent b5ef9c0 commit 6b104b4

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

pom.xml

Lines changed: 23 additions & 21 deletions
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

@@ -395,26 +396,19 @@
395396
<groupId>org.springframework.boot</groupId>
396397
<artifactId>spring-boot-maven-plugin</artifactId>
397398
</plugin>
399+
398400
<plugin>
399401
<groupId>org.apache.maven.plugins</groupId>
400-
<artifactId>maven-dependency-plugin</artifactId>
401-
<executions>
402-
<execution>
403-
<goals>
404-
<goal>properties</goal>
405-
</goals>
406-
</execution>
407-
</executions>
408-
</plugin>
409-
<plugin>
410-
<groupId>org.apache.maven.plugins</groupId>
411-
<artifactId>maven-surefire-plugin</artifactId>
402+
<artifactId>maven-compiler-plugin</artifactId>
403+
<version>3.11.0</version>
412404
<configuration>
413-
<systemPropertyVariables>
414-
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
415-
<maven.home>${maven.home}</maven.home>
416-
</systemPropertyVariables>
417-
<argLine>@{argLine} -javaagent:${settings.localRepository}/org/mockito/mockito-core/${mockito.version}/mockito-core-${mockito.version}.jar</argLine>
405+
<annotationProcessorPaths>
406+
<path>
407+
<groupId>org.projectlombok</groupId>
408+
<artifactId>lombok</artifactId>
409+
<version>1.18.30</version>
410+
</path>
411+
</annotationProcessorPaths>
418412
</configuration>
419413
</plugin>
420414

@@ -433,9 +427,6 @@
433427
<groupId>org.apache.maven.plugins</groupId>
434428
<artifactId>maven-failsafe-plugin</artifactId>
435429
<version>3.5.4</version>
436-
<configuration>
437-
<argLine>@{argLine} -javaagent:${settings.localRepository}/org/mockito/mockito-core/${mockito.version}/mockito-core-${mockito.version}.jar</argLine>
438-
</configuration>
439430
<executions>
440431
<execution>
441432
<goals>
@@ -446,6 +437,17 @@
446437
</executions>
447438
</plugin>
448439

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+
449451
<plugin>
450452
<groupId>org.jacoco</groupId>
451453
<artifactId>jacoco-maven-plugin</artifactId>

0 commit comments

Comments
 (0)