Skip to content

Commit bb89ed8

Browse files
authored
Merge pull request #50653 from gsmet/java-25-options
Opens java.lang as it's required for Java 24+
2 parents 99d628e + c3adac2 commit bb89ed8

File tree

11 files changed

+17
-1
lines changed

11 files changed

+17
-1
lines changed

devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,7 @@ private DevModeCommandLine newLauncher(String actualDebugPort, String bootstrapI
14211421
builder.jvmArgs("-Dquarkus-internal.test.specific-selection=maven:" + test);
14221422
}
14231423

1424-
if (openJavaLang) {
1424+
if (openJavaLang || Runtime.version().feature() >= 24) {
14251425
builder.addOpens("java.base/java.lang=ALL-UNNAMED");
14261426
}
14271427

independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus-extension/code/extension-base/java/pom.tpl.qute.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
<artifactId>maven-surefire-plugin</artifactId>
8585
<version>$\{surefire-plugin.version}</version>
8686
<configuration>
87+
<argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine><!-- for JDK 24+ -->
8788
<systemPropertyVariables>
8889
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
8990
<maven.home>$\{maven.home}</maven.home>
@@ -96,6 +97,7 @@
9697
<artifactId>maven-failsafe-plugin</artifactId>
9798
<version>$\{failsafe-plugin.version}</version>
9899
<configuration>
100+
<argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine><!-- for JDK 24+ -->
99101
<systemPropertyVariables>
100102
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
101103
<maven.home>$\{maven.home}</maven.home>

independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/buildtool/gradle-kotlin-dsl/base/build-layout.include.qute

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,5 @@ java {
5757

5858
tasks.withType<Test> {
5959
systemProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager")
60+
jvmArgs("--add-opens", "java.base/java.lang=ALL-UNNAMED")
6061
}

independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/buildtool/gradle/base/build-layout.include.qute

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,5 @@ java {
5353

5454
test {
5555
systemProperty "java.util.logging.manager", "org.jboss.logmanager.LogManager"
56+
jvmArgs "--add-opens", "java.base/java.lang=ALL-UNNAMED"
5657
}

independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/buildtool/maven/base/pom.tpl.qute.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@
161161
<artifactId>maven-surefire-plugin</artifactId>
162162
<version>$\{surefire-plugin.version}</version>
163163
<configuration>
164+
<argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine><!-- for JDK 24+ -->
164165
<systemPropertyVariables>
165166
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
166167
<maven.home>$\{maven.home}</maven.home>
@@ -181,6 +182,7 @@
181182
</execution>
182183
</executions>
183184
<configuration>
185+
<argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine><!-- for JDK 24+ -->
184186
<systemPropertyVariables>
185187
{#if generate-native}
186188
<native.image.path>$\{project.build.directory}/$\{project.build.finalName}-runner</native.image.path>

independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/QuarkusCodestartGenerationTest/generateDefault/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
<artifactId>maven-surefire-plugin</artifactId>
7171
<version>${surefire-plugin.version}</version>
7272
<configuration>
73+
<argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine>
7374
<systemPropertyVariables>
7475
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
7576
<maven.home>${maven.home}</maven.home>
@@ -88,6 +89,7 @@
8889
</execution>
8990
</executions>
9091
<configuration>
92+
<argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine>
9193
<systemPropertyVariables>
9294
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
9395
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>

independent-projects/tools/devtools-testing/src/test/resources/__snapshots__/QuarkusCodestartGenerationTest/generateMavenWithCustomDep/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
<artifactId>maven-surefire-plugin</artifactId>
8686
<version>${surefire-plugin.version}</version>
8787
<configuration>
88+
<argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine>
8889
<systemPropertyVariables>
8990
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
9091
<maven.home>${maven.home}</maven.home>
@@ -103,6 +104,7 @@
103104
</execution>
104105
</executions>
105106
<configuration>
107+
<argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine>
106108
<systemPropertyVariables>
107109
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
108110
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>

integration-tests/devtools/src/test/resources/__snapshots__/KotlinSerializationCodestartTest/testGradleContent/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ java {
3131

3232
test {
3333
systemProperty "java.util.logging.manager", "org.jboss.logmanager.LogManager"
34+
jvmArgs "--add-opens", "java.base/java.lang=ALL-UNNAMED"
3435
}
3536
allOpen {
3637
annotation("jakarta.ws.rs.Path")

integration-tests/devtools/src/test/resources/__snapshots__/KotlinSerializationCodestartTest/testGradleKotlinContent/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ java {
3535

3636
tasks.withType<Test> {
3737
systemProperty("java.util.logging.manager", "org.jboss.logmanager.LogManager")
38+
jvmArgs("--add-opens", "java.base/java.lang=ALL-UNNAMED")
3839
}
3940
allOpen {
4041
annotation("jakarta.ws.rs.Path")

integration-tests/devtools/src/test/resources/__snapshots__/KotlinSerializationCodestartTest/testMavenContent/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
<artifactId>maven-surefire-plugin</artifactId>
100100
<version>${surefire-plugin.version}</version>
101101
<configuration>
102+
<argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine>
102103
<systemPropertyVariables>
103104
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
104105
<maven.home>${maven.home}</maven.home>
@@ -117,6 +118,7 @@
117118
</execution>
118119
</executions>
119120
<configuration>
121+
<argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine>
120122
<systemPropertyVariables>
121123
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
122124
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>

0 commit comments

Comments
 (0)