Skip to content

Commit 93e1086

Browse files
committed
Manual changes to merge #4090 into master
1 parent 17f0ec8 commit 93e1086

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

pom.xml

+54-1
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,60 @@
408408
</plugins>
409409
</build>
410410
</profile>
411-
411+
<profile>
412+
<!-- And different set up for JDK 21 -->
413+
<id>java21</id>
414+
<activation>
415+
<jdk>21</jdk>
416+
</activation>
417+
<build>
418+
<plugins>
419+
<plugin>
420+
<groupId>org.codehaus.mojo</groupId>
421+
<artifactId>build-helper-maven-plugin</artifactId>
422+
<executions>
423+
<execution>
424+
<id>add-test-source</id>
425+
<phase>generate-test-sources</phase>
426+
<goals>
427+
<goal>add-test-source</goal>
428+
</goals>
429+
<configuration>
430+
<sources>
431+
<source>src/test-jdk14/java</source>
432+
<source>src/test-jdk17/java</source>
433+
<source>src/test-jdk21/java</source>
434+
</sources>
435+
</configuration>
436+
</execution>
437+
</executions>
438+
</plugin>
439+
<plugin>
440+
<groupId>org.apache.maven.plugins</groupId>
441+
<artifactId>maven-compiler-plugin</artifactId>
442+
<inherited>true</inherited>
443+
<configuration>
444+
<!-- Enable Java 21 for all sources so that Intellij picks the right language level -->
445+
<source>21</source>
446+
<release>21</release>
447+
<compilerArgs>
448+
<arg>-parameters</arg>
449+
<arg>--add-opens=java.base/java.lang=ALL-UNNAMED</arg>
450+
<arg>--add-opens=java.base/java.util=ALL-UNNAMED</arg>
451+
</compilerArgs>
452+
</configuration>
453+
</plugin>
454+
<plugin>
455+
<groupId>org.apache.maven.plugins</groupId>
456+
<artifactId>maven-surefire-plugin</artifactId>
457+
<configuration>
458+
<argLine>--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED</argLine>
459+
</configuration>
460+
</plugin>
461+
</plugins>
462+
</build>
463+
</profile>
464+
412465
<!-- 10-Nov-2020, tatu: Added via [databind#2931] -->
413466
<profile>
414467
<id>errorprone</id>

0 commit comments

Comments
 (0)