Remove deprecated GraalVM native-image flags (#9118)

Motivation:

The first final version of GraalVM was released which deprecated some flags. We should use the new ones.

Modifications:

Removes the use of deprecated GraalVM native-image flags
Adds a flag to initialize netty at build time.

Result:

Do not use deprecated flags
This commit is contained in:
Vojin Jovanovic 2019-05-22 19:20:54 +02:00 committed by Norman Maurer
parent 9c51a8c6d4
commit f7a8a6f1ae
5 changed files with 13 additions and 9 deletions

View File

@ -12,4 +12,5 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
Args = --delay-class-initialization-to-runtime=io.netty.handler.codec.http.HttpObjectEncoder,io.netty.handler.codec.http.websocketx.WebSocket00FrameEncoder Args = --initialize-at-build-time=io.netty \
--initialize-at-run-time=io.netty.handler.codec.http.HttpObjectEncoder,io.netty.handler.codec.http.websocketx.WebSocket00FrameEncoder

View File

@ -12,5 +12,5 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
Args = --rerun-class-initialization-at-runtime=io.netty.handler.codec.http2.Http2CodecUtil \ Args = --initialize-at-build-time=io.netty \
--delay-class-initialization-to-runtime=io.netty.handler.codec.http2.DefaultHttp2FrameWriter --initialize-at-run-time=io.netty.handler.codec.http2.Http2CodecUtil,io.netty.handler.codec.http2.DefaultHttp2FrameWriter

View File

@ -25,3 +25,6 @@ RUN curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | JABBA_COMMA
RUN echo 'export JAVA_HOME="/jdk"' >> ~/.bashrc RUN echo 'export JAVA_HOME="/jdk"' >> ~/.bashrc
RUN echo 'PATH=/jdk/bin:$PATH' >> ~/.bashrc RUN echo 'PATH=/jdk/bin:$PATH' >> ~/.bashrc
# when the JDK is GraalVM install native-image
RUN if [ -O /jdk/bin/gu ]; then /jdk/bin/gu install native-image; else echo "Not GraalVM, skip installation of native-image" ; fi

View File

@ -7,7 +7,7 @@ services:
build: build:
args: args:
centos_version : "6" centos_version : "6"
java_version : "graalvm@1.0.0-16" java_version : "graalvm@19.0.0"
test: test:
image: netty:centos-6-1.8 image: netty:centos-6-1.8

10
pom.xml
View File

@ -74,7 +74,7 @@
<activation> <activation>
<file> <file>
<!-- GraalVM Component Updater should exists when using GraalVM--> <!-- GraalVM Component Updater should exists when using GraalVM-->
<exists>${java.home}/bin/native-image</exists> <exists>${java.home}/bin/gu</exists>
</file> </file>
</activation> </activation>
<properties> <properties>
@ -175,7 +175,7 @@
<argLine.java9>--illegal-access=deny --add-modules java.xml.bind ${argLine.java9.extras}</argLine.java9> <argLine.java9>--illegal-access=deny --add-modules java.xml.bind ${argLine.java9.extras}</argLine.java9>
<!-- Not use alpn agent as Java9 supports alpn out of the box --> <!-- Not use alpn agent as Java9 supports alpn out of the box -->
<argLine.alpnAgent /> <argLine.alpnAgent />
<!-- Skip as maven plugin not works with Java9 yet --> <!-- Skip as maven plugin not works with Java9 yet -->
<forbiddenapis.skip>true</forbiddenapis.skip> <forbiddenapis.skip>true</forbiddenapis.skip>
<!-- Needed because of https://issues.apache.org/jira/browse/MENFORCER-275 --> <!-- Needed because of https://issues.apache.org/jira/browse/MENFORCER-275 -->
<enforcer.plugin.version>3.0.0-M1</enforcer.plugin.version> <enforcer.plugin.version>3.0.0-M1</enforcer.plugin.version>
@ -310,7 +310,7 @@
<skipHttp2Testsuite>false</skipHttp2Testsuite> <skipHttp2Testsuite>false</skipHttp2Testsuite>
<!-- Skip for now as we have no version released yet of netty 5 --> <!-- Skip for now as we have no version released yet of netty 5 -->
<skipJapicmp>true</skipJapicmp> <skipJapicmp>true</skipJapicmp>
<graalvm.version>1.0.0-rc15</graalvm.version> <graalvm.version>19.0.0</graalvm.version>
<!-- By default skip native testsuite as it requires a custom environment with graalvm installed --> <!-- By default skip native testsuite as it requires a custom environment with graalvm installed -->
<skipNativeImageTestsuite>true</skipNativeImageTestsuite> <skipNativeImageTestsuite>true</skipNativeImageTestsuite>
</properties> </properties>
@ -446,7 +446,7 @@
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<!-- <!--
Completely optional and only needed for OCSP stapling to construct and Completely optional and only needed for OCSP stapling to construct and
parse OCSP requests and responses. parse OCSP requests and responses.
--> -->
@ -915,7 +915,7 @@
</property> </property>
</properties> </properties>
<jvm>${testJvm}</jvm> <jvm>${testJvm}</jvm>
<!-- Ensure the whole stacktrace is preserved when an exception is thrown. See https://issues.apache.org/jira/browse/SUREFIRE-1457 --> <!-- Ensure the whole stacktrace is preserved when an exception is thrown. See https://issues.apache.org/jira/browse/SUREFIRE-1457 -->
<trimStackTrace>false</trimStackTrace> <trimStackTrace>false</trimStackTrace>
</configuration> </configuration>
</plugin> </plugin>