Add a build profile for JDK 16 (#10675)

Motivation:
Java 16 will come around eventually anyway, and this makes it easier for people to experiment with Early Access builds.

Modification:
- Added Maven profiles for JDK 16 to relevant pom files.
- Removed the `--add-exports java.base/sun.security.x509=ALL-UNNAMED` argument when running tests; we've not needed it since the Java11-as-baseline PR landed.

Result:
Netty now builds on JDK 16 pre-releases (provided they've not broken compatibility in some way).
This commit is contained in:
Chris Vest 2020-10-12 16:42:40 +02:00 committed by GitHub
parent a179db8066
commit 6201c6d80f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 44 additions and 15 deletions

View File

@ -28,8 +28,6 @@
<properties>
<javaModuleName>io.netty.handler.proxy</javaModuleName>
<!-- Needed for SelfSignedCertificate -->
<argLine.java9.extras>--add-exports java.base/sun.security.x509=ALL-UNNAMED</argLine.java9.extras>
</properties>
<name>Netty/Handler/Proxy</name>

View File

@ -28,8 +28,6 @@
<properties>
<javaModuleName>io.netty.handler</javaModuleName>
<!-- Needed for SelfSignedCertificate -->
<argLine.java9.extras>--add-exports java.base/sun.security.x509=ALL-UNNAMED</argLine.java9.extras>
</properties>
<name>Netty/Handler</name>

27
pom.xml
View File

@ -97,6 +97,31 @@
<testJvm/>
</properties>
</profile>
<!-- JDK16 -->
<profile>
<id>java16</id>
<activation>
<jdk>16</jdk>
</activation>
<properties>
<!-- Not use alpn agent as Java11+ supports alpn out of the box -->
<argLine.alpnAgent />
<argLine.java9.extras />
<!-- Export some stuff which is used during our tests -->
<argLine.java9>--illegal-access=deny ${argLine.java9.extras}</argLine.java9>
<forbiddenapis.skip>true</forbiddenapis.skip>
<!-- Needed because of https://issues.apache.org/jira/browse/MENFORCER-275 -->
<enforcer.plugin.version>3.0.0-M3</enforcer.plugin.version>
<!-- 1.4.x does not work in Java10+ -->
<jboss.marshalling.version>2.0.5.Final</jboss.marshalling.version>
<!-- This is the minimum supported by Java12+ -->
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<!-- pax-exam does not work on latest Java12 EA 22 build -->
<skipOsgiTestsuite>true</skipOsgiTestsuite>
</properties>
</profile>
<!-- JDK15 -->
<profile>
<id>java15</id>
@ -893,7 +918,7 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.5.4</version>
<version>5.1.1</version>
<executions>
<execution>
<id>generate-manifest</id>

View File

@ -107,8 +107,6 @@
</dependencies>
<properties>
<!-- Needed for SSL tests as these use the SelfSignedCertificate -->
<argLine.java9.extras>--add-exports java.base/sun.security.x509=ALL-UNNAMED</argLine.java9.extras>
<skipJapicmp>true</skipJapicmp>
</properties>

View File

@ -50,13 +50,27 @@
<argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common>
</properties>
</profile>
<profile>
<id>java15</id>
<activation>
<jdk>15</jdk>
</activation>
<properties>
<argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common>
</properties>
</profile>
<profile>
<id>java16</id>
<activation>
<jdk>16</jdk>
</activation>
<properties>
<argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common>
</properties>
</profile>
</profiles>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<!-- Needed for SelfSignedCertificate -->
<argLine.java9.extras>--add-exports java.base/sun.security.x509=ALL-UNNAMED</argLine.java9.extras>
<skipJapicmp>true</skipJapicmp>
</properties>

View File

@ -28,8 +28,6 @@
<properties>
<javaModuleName>io.netty.transport.epoll</javaModuleName>
<!-- Needed as we use SelfSignedCertificate in our tests -->
<argLine.java9.extras>--add-exports java.base/sun.security.x509=ALL-UNNAMED</argLine.java9.extras>
<unix.common.lib.name>netty-unix-common</unix.common.lib.name>
<unix.common.lib.dir>${project.build.directory}/unix-common-lib</unix.common.lib.dir>
<unix.common.lib.unpacked.dir>${unix.common.lib.dir}/META-INF/native/lib</unix.common.lib.unpacked.dir>

View File

@ -353,8 +353,6 @@
<properties>
<javaModuleName>io.netty.transport.kqueue</javaModuleName>
<!-- Needed as we use SelfSignedCertificate in our tests -->
<argLine.java9.extras>--add-exports java.base/sun.security.x509=ALL-UNNAMED</argLine.java9.extras>
<unix.common.lib.name>netty-unix-common</unix.common.lib.name>
<unix.common.lib.dir>${project.build.directory}/unix-common-lib</unix.common.lib.dir>
<unix.common.lib.unpacked.dir>${unix.common.lib.dir}/META-INF/native/lib</unix.common.lib.unpacked.dir>