Skip to content

Commit

Permalink
Use profiles to use different mockito jars for Java 8 vs. Java 9+
Browse files Browse the repository at this point in the history
  • Loading branch information
jjlauer committed Nov 28, 2023
1 parent 49790d9 commit 0cad819
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/java21.yaml

This file was deleted.

26 changes: 24 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,28 @@
<module>crux-hamcrest</module>
</modules>

<!-- profiles for using different mockito jars for testing so we can test on Java 8 -> 21 -->
<profiles>
<profile>
<id>java8</id>
<activation>
<jdk>1.8</jdk>
</activation>
<properties>
<mockito.version>4.11.0</mockito.version>
</properties>
</profile>
<profile>
<id>java9plus</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<properties>
<mockito.version>5.4.0</mockito.version>
</properties>
</profile>
</profiles>

<dependencyManagement>

<dependencies>
Expand Down Expand Up @@ -97,11 +119,11 @@
<artifactId>junit</artifactId>
<version>4.13.1</version>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.4.0</version>
<version>${mockito.version}</version>
</dependency>

<dependency>
Expand Down

0 comments on commit 0cad819

Please sign in to comment.