|
54 | 54 | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
55 | 55 | <module-name>${groupId}.${artifactId}</module-name>
|
56 | 56 | <javadoc.failOnWarnings>true</javadoc.failOnWarnings>
|
| 57 | + <!-- This is required for later correct replacement of surefireArgLine --> |
| 58 | + <!-- see surefire-java8 and surefire-java9+ profiles --> |
| 59 | + <surefireArgLine/> |
57 | 60 | </properties>
|
58 | 61 |
|
59 | 62 | <dependencies>
|
|
92 | 95 | <scope>test</scope>
|
93 | 96 | </dependency>
|
94 | 97 |
|
| 98 | + <!-- Start mockito workaround --> |
| 99 | + <!-- https://github.com/mockito/mockito/issues/3121 --> |
| 100 | + <!-- These are transitive dependencies of mockito we are forcing --> |
| 101 | + <dependency> |
| 102 | + <groupId>net.bytebuddy</groupId> |
| 103 | + <artifactId>byte-buddy</artifactId> |
| 104 | + <version>1.15.1</version> |
| 105 | + <scope>test</scope> |
| 106 | + </dependency> |
| 107 | + |
| 108 | + <dependency> |
| 109 | + <groupId>net.bytebuddy</groupId> |
| 110 | + <artifactId>byte-buddy-agent</artifactId> |
| 111 | + <version>1.15.1</version> |
| 112 | + <scope>test</scope> |
| 113 | + </dependency> |
| 114 | + <!-- End mockito workaround--> |
| 115 | + |
95 | 116 | <dependency>
|
96 | 117 | <groupId>uk.org.lidalia</groupId>
|
97 | 118 | <artifactId>slf4j-test</artifactId>
|
|
206 | 227 | <version>3.13.0</version>
|
207 | 228 | </plugin>
|
208 | 229 |
|
209 |
| - <plugin> |
210 |
| - <groupId>org.apache.maven.plugins</groupId> |
211 |
| - <artifactId>maven-surefire-plugin</artifactId> |
212 |
| - <version>3.5.0</version> |
213 |
| - <configuration> |
214 |
| - <excludes> |
215 |
| - <!-- tests to exclude --> |
216 |
| - <exclude>${testExclusions}</exclude> |
217 |
| - </excludes> |
218 |
| - <argLine>${surefireArgLine}</argLine> |
219 |
| - </configuration> |
220 |
| - </plugin> |
221 |
| - |
222 | 230 | <plugin>
|
223 | 231 | <groupId>org.apache.maven.plugins</groupId>
|
224 | 232 | <artifactId>maven-checkstyle-plugin</artifactId>
|
|
433 | 441 | </plugins>
|
434 | 442 | </build>
|
435 | 443 |
|
| 444 | + <profiles> |
| 445 | + <!-- profile for running tests under java 8 (used mostly in CI) --> |
| 446 | + <!-- selected automatically by JDK activeation (see https://maven.apache.org/guides/introduction/introduction-to-profiles.html#implicit-profile-activation) --> |
| 447 | + <profile> |
| 448 | + <id>surefire-java8</id> |
| 449 | + <activation> |
| 450 | + <!-- JDK 1.8 --> |
| 451 | + <jdk>1.8</jdk> |
| 452 | + </activation> |
| 453 | + <build> |
| 454 | + <plugins> |
| 455 | + <plugin> |
| 456 | + <groupId>org.apache.maven.plugins</groupId> |
| 457 | + <artifactId>maven-surefire-plugin</artifactId> |
| 458 | + <version>3.5.0</version> |
| 459 | + <configuration> |
| 460 | + <excludes> |
| 461 | + <!-- tests to exclude --> |
| 462 | + <exclude>${testExclusions}</exclude> |
| 463 | + </excludes> |
| 464 | + <argLine>@{surefireArgLine}</argLine> |
| 465 | + </configuration> |
| 466 | + </plugin> |
| 467 | + </plugins> |
| 468 | + </build> |
| 469 | + </profile> |
| 470 | + |
| 471 | + <!-- profile for running tests under java 9+ (used for dev environments where people don't want to be locked to Java 8) --> |
| 472 | + <!-- selected automatically by JDK activeation (see https://maven.apache.org/guides/introduction/introduction-to-profiles.html#implicit-profile-activation) --> |
| 473 | + <profile> |
| 474 | + <id>surefire-java9+</id> |
| 475 | + <activation> |
| 476 | + <!-- JDK 1.9+ --> |
| 477 | + <jdk>[1.9,)</jdk> |
| 478 | + </activation> |
| 479 | + <build> |
| 480 | + <plugins> |
| 481 | + <plugin> |
| 482 | + <groupId>org.apache.maven.plugins</groupId> |
| 483 | + <artifactId>maven-surefire-plugin</artifactId> |
| 484 | + <version>3.5.0</version> |
| 485 | + <configuration> |
| 486 | + <excludes> |
| 487 | + <!-- tests to exclude --> |
| 488 | + <exclude>${testExclusions}</exclude> |
| 489 | + </excludes> |
| 490 | + <argLine>@{surefireArgLine} --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED</argLine> |
| 491 | + </configuration> |
| 492 | + </plugin> |
| 493 | + </plugins> |
| 494 | + </build> |
| 495 | + </profile> |
| 496 | + </profiles> |
| 497 | + |
436 | 498 | <distributionManagement>
|
437 | 499 | <snapshotRepository>
|
438 | 500 | <id>ossrh</id>
|
|
0 commit comments