Skip to content

Commit 2468659

Browse files
committed
Add profile-specific Mockito dependencies for multi-JDK support
1 parent 5f3d94d commit 2468659

File tree

1 file changed

+110
-18
lines changed

1 file changed

+110
-18
lines changed

pom.xml

Lines changed: 110 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -142,24 +142,6 @@
142142
<scope>provided</scope>
143143
</dependency>
144144
<!-- dependencies for running tests -->
145-
<dependency>
146-
<groupId>org.mockito</groupId>
147-
<artifactId>mockito-core</artifactId>
148-
<version>5.14.2</version>
149-
<scope>test</scope>
150-
</dependency>
151-
<dependency>
152-
<groupId>net.bytebuddy</groupId>
153-
<artifactId>byte-buddy</artifactId>
154-
<version>1.17.5</version>
155-
<scope>test</scope>
156-
</dependency>
157-
<dependency>
158-
<groupId>net.bytebuddy</groupId>
159-
<artifactId>byte-buddy-agent</artifactId>
160-
<version>1.17.5</version>
161-
<scope>test</scope>
162-
</dependency>
163145
<dependency>
164146
<groupId>org.junit.platform</groupId>
165147
<artifactId>junit-platform-console</artifactId>
@@ -272,6 +254,32 @@
272254
<profiles>
273255
<profile>
274256
<id>jre8</id>
257+
<dependencies>
258+
<dependency>
259+
<groupId>org.mockito</groupId>
260+
<artifactId>mockito-core</artifactId>
261+
<version>4.11.0</version>
262+
<scope>test</scope>
263+
</dependency>
264+
<dependency>
265+
<groupId>org.mockito</groupId>
266+
<artifactId>mockito-inline</artifactId>
267+
<version>4.11.0</version>
268+
<scope>test</scope>
269+
</dependency>
270+
<dependency>
271+
<groupId>net.bytebuddy</groupId>
272+
<artifactId>byte-buddy</artifactId>
273+
<version>1.15.11</version>
274+
<scope>test</scope>
275+
</dependency>
276+
<dependency>
277+
<groupId>net.bytebuddy</groupId>
278+
<artifactId>byte-buddy-agent</artifactId>
279+
<version>1.15.11</version>
280+
<scope>test</scope>
281+
</dependency>
282+
</dependencies>
275283
<build>
276284
<finalName>${project.artifactId}-${project.version}.jre8${releaseExt}</finalName>
277285
<plugins>
@@ -325,6 +333,27 @@
325333
</profile>
326334
<profile>
327335
<id>jre11</id>
336+
<dependencies>
337+
<!-- JDK 11 compatible Mockito -->
338+
<dependency>
339+
<groupId>org.mockito</groupId>
340+
<artifactId>mockito-core</artifactId>
341+
<version>5.14.2</version>
342+
<scope>test</scope>
343+
</dependency>
344+
<dependency>
345+
<groupId>net.bytebuddy</groupId>
346+
<artifactId>byte-buddy</artifactId>
347+
<version>1.17.5</version>
348+
<scope>test</scope>
349+
</dependency>
350+
<dependency>
351+
<groupId>net.bytebuddy</groupId>
352+
<artifactId>byte-buddy-agent</artifactId>
353+
<version>1.17.5</version>
354+
<scope>test</scope>
355+
</dependency>
356+
</dependencies>
328357
<build>
329358
<finalName>${project.artifactId}-${project.version}.jre11${releaseExt}</finalName>
330359
<plugins>
@@ -358,6 +387,27 @@
358387
</profile>
359388
<profile>
360389
<id>jre17</id>
390+
<dependencies>
391+
<!-- JDK 17 compatible Mockito -->
392+
<dependency>
393+
<groupId>org.mockito</groupId>
394+
<artifactId>mockito-core</artifactId>
395+
<version>5.14.2</version>
396+
<scope>test</scope>
397+
</dependency>
398+
<dependency>
399+
<groupId>net.bytebuddy</groupId>
400+
<artifactId>byte-buddy</artifactId>
401+
<version>1.17.5</version>
402+
<scope>test</scope>
403+
</dependency>
404+
<dependency>
405+
<groupId>net.bytebuddy</groupId>
406+
<artifactId>byte-buddy-agent</artifactId>
407+
<version>1.17.5</version>
408+
<scope>test</scope>
409+
</dependency>
410+
</dependencies>
361411
<build>
362412
<finalName>${project.artifactId}-${project.version}.jre17${releaseExt}</finalName>
363413
<plugins>
@@ -391,6 +441,27 @@
391441
</profile>
392442
<profile>
393443
<id>jre21</id>
444+
<dependencies>
445+
<!-- JDK 21 compatible Mockito -->
446+
<dependency>
447+
<groupId>org.mockito</groupId>
448+
<artifactId>mockito-core</artifactId>
449+
<version>5.14.2</version>
450+
<scope>test</scope>
451+
</dependency>
452+
<dependency>
453+
<groupId>net.bytebuddy</groupId>
454+
<artifactId>byte-buddy</artifactId>
455+
<version>1.17.5</version>
456+
<scope>test</scope>
457+
</dependency>
458+
<dependency>
459+
<groupId>net.bytebuddy</groupId>
460+
<artifactId>byte-buddy-agent</artifactId>
461+
<version>1.17.5</version>
462+
<scope>test</scope>
463+
</dependency>
464+
</dependencies>
394465
<build>
395466
<finalName>${project.artifactId}-${project.version}.jre21${releaseExt}</finalName>
396467
<plugins>
@@ -427,6 +498,27 @@
427498
<activation>
428499
<activeByDefault>true</activeByDefault>
429500
</activation>
501+
<dependencies>
502+
<!-- JDK 25 compatible Mockito -->
503+
<dependency>
504+
<groupId>org.mockito</groupId>
505+
<artifactId>mockito-core</artifactId>
506+
<version>5.14.2</version>
507+
<scope>test</scope>
508+
</dependency>
509+
<dependency>
510+
<groupId>net.bytebuddy</groupId>
511+
<artifactId>byte-buddy</artifactId>
512+
<version>1.17.5</version>
513+
<scope>test</scope>
514+
</dependency>
515+
<dependency>
516+
<groupId>net.bytebuddy</groupId>
517+
<artifactId>byte-buddy-agent</artifactId>
518+
<version>1.17.5</version>
519+
<scope>test</scope>
520+
</dependency>
521+
</dependencies>
430522
<build>
431523
<finalName>${project.artifactId}-${project.version}.jre25${releaseExt}</finalName>
432524
<plugins>

0 commit comments

Comments
 (0)