Skip to content

Commit cdb185e

Browse files
committed
Use Java 21 on CI
(cherry picked from commit 34ac4f3) Conflicts: .github/workflows/test-supported-java-versions-5.x.yml .github/workflows/test-supported-java-versions-main.yml
1 parent 745c678 commit cdb185e

File tree

6 files changed

+22
-18
lines changed

6 files changed

+22
-18
lines changed

.github/workflows/publish-snapshot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
- name: Set up JDK
1616
uses: actions/setup-java@v3
1717
with:
18-
distribution: 'temurin'
19-
java-version: '17'
18+
distribution: 'zulu'
19+
java-version: '21'
2020
cache: 'maven'
2121
server-id: ossrh
2222
server-username: MAVEN_USERNAME

.github/workflows/test-rabbitmq-alphas.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ jobs:
3232
- name: Set up JDK
3333
uses: actions/setup-java@v3
3434
with:
35-
distribution: 'temurin'
36-
java-version: '17'
35+
distribution: 'zulu'
36+
java-version: '21'
3737
cache: 'maven'
3838
- name: Start cluster
3939
run: ci/start-cluster.sh

.github/workflows/test-supported-java-versions-5.x.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-22.04
1111
strategy:
1212
matrix:
13-
java: [ '8', '11', '17', '19', '20-ea' ]
13+
java: [ '8', '11', '17', '20', '21' ]
1414
name: Test against Java ${{ matrix.java }}
1515
steps:
1616
- uses: actions/checkout@v4

.github/workflows/test-supported-java-versions-main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-22.04
1111
strategy:
1212
matrix:
13-
java: [ '8', '11', '17', '19', '20-ea' ]
13+
java: [ '8', '11', '17', '20', '21' ]
1414
name: Test against Java ${{ matrix.java }}
1515
steps:
1616
- uses: actions/checkout@v4

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
- name: Set up JDK
2828
uses: actions/setup-java@v3
2929
with:
30-
distribution: 'temurin'
31-
java-version: '17'
30+
distribution: 'zulu'
31+
java-version: '21'
3232
cache: 'maven'
3333
server-id: ossrh
3434
server-username: MAVEN_USERNAME

pom.xml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,16 @@
174174
</properties>
175175
</profile>
176176

177+
<profile>
178+
<id>jvm-test-arguments-java-21-and-more</id>
179+
<activation>
180+
<jdk>[21,)</jdk>
181+
</activation>
182+
<properties>
183+
<test-arguments>-XX:+EnableDynamicAgentLoading</test-arguments>
184+
</properties>
185+
</profile>
186+
177187
<profile>
178188
<!--
179189
Java 8's Javadoc is way more sensible to documentation
@@ -406,6 +416,7 @@
406416
<version>${maven.failsafe.plugin.version}</version>
407417
<configuration>
408418
<systemPropertyVariables>
419+
<net.bytebuddy.experimental>true</net.bytebuddy.experimental>
409420
<make.bin>${make.bin}</make.bin>
410421
<rabbitmq.dir>${rabbitmq.dir}</rabbitmq.dir>
411422
<rabbitmqctl.bin>${rabbitmqctl.bin}</rabbitmqctl.bin>
@@ -434,11 +445,7 @@
434445
<include>**/ServerTestSuite.*</include>
435446
<include>**/HaTestSuite.*</include>
436447
</includes>
437-
<!--
438-
needed because of bug in OpenJDK 8 u181 on Debian distros
439-
see https://stackoverflow.com/questions/53010200/maven-surefire-could-not-find-forkedbooter-class
440-
-->
441-
<argLine>-Djdk.net.URLClassPath.disableClassPathURLCheck=true</argLine>
448+
<argLine>${test-arguments}</argLine>
442449
</configuration>
443450
<executions>
444451
<execution>
@@ -473,13 +480,10 @@
473480
<version>${maven.failsafe.plugin.version}</version>
474481
<configuration>
475482
<systemPropertyVariables>
483+
<net.bytebuddy.experimental>true</net.bytebuddy.experimental>
476484
<use.nio>true</use.nio>
477485
</systemPropertyVariables>
478-
<!--
479-
needed because of bug in OpenJDK 8 u181 on Debian distros
480-
see https://stackoverflow.com/questions/53010200/maven-surefire-could-not-find-forkedbooter-class
481-
-->
482-
<argLine>-Djdk.net.URLClassPath.disableClassPathURLCheck=true</argLine>
486+
<argLine>${test-arguments}</argLine>
483487
</configuration>
484488
</plugin>
485489
</plugins>

0 commit comments

Comments
 (0)