Skip to content

Upgrade GraalVM native image to 22.3.0 #5308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions applications/mp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,22 @@
<build>
<plugins>
<plugin>
<groupId>io.helidon.build-tools</groupId>
<artifactId>helidon-maven-plugin</artifactId>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<executions>
<execution>
<id>native-image</id>
<id>resource-config</id>
<goals>
<goal>generateResourceConfig</goal>
</goals>
<phase>package</phase>
</execution>
<execution>
<id>build-native-image</id>
<goals>
<goal>native-image</goal>
<goal>compile</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
Expand Down
34 changes: 34 additions & 0 deletions applications/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<version.plugin.helidon>3.0.0</version.plugin.helidon>
<version.plugin.helidon-cli>3.0.0</version.plugin.helidon-cli>
<version.plugin.jar>3.0.2</version.plugin.jar>
<version.plugin.nativeimage>0.9.16</version.plugin.nativeimage>
<version.plugin.os>1.5.0.Final</version.plugin.os>
<version.plugin.protobuf>0.5.1</version.plugin.protobuf>
<version.plugin.resources>2.7</version.plugin.resources>
Expand Down Expand Up @@ -170,6 +171,39 @@
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${version.lib.grpc}:exe:${os.detected.classifier}</pluginArtifact>
</configuration>
</plugin>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>${version.plugin.nativeimage}</version>
<executions>
<execution>
<id>resource-config</id>
<configuration>
<!-- generate records for all module's resources -->
<isDetectionEnabled>true</isDetectionEnabled>
</configuration>
</execution>
<execution>
<id>build-native-image</id>
<configuration>
<!-- generate an argument file for native image - great for troubleshooting -->
<useArgFile>true</useArgFile>
<!-- this needs to be defined to have a single set of jars on classpath,
default approach would add classpath of module (from maven) and from jar (manifest) -->
<classesDirectory>${project.build.outputDirectory}</classesDirectory>
<imageName>${project.build.finalName}</imageName>
<fallback>false</fallback>
<metadataRepository>
<enabled>false</enabled>
</metadataRepository>
<buildArgs>
<!-- Some native image features use the svm dependencies which require additional exports -->
<arg>--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.configure=ALL-UNNAMED</arg>
</buildArgs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down
16 changes: 12 additions & 4 deletions applications/se/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,22 @@
<build>
<plugins>
<plugin>
<groupId>io.helidon.build-tools</groupId>
<artifactId>helidon-maven-plugin</artifactId>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<executions>
<execution>
<id>native-image</id>
<id>resource-config</id>
<goals>
<goal>generateResourceConfig</goal>
</goals>
<phase>package</phase>
</execution>
<execution>
<id>build-native-image</id>
<goals>
<goal>native-image</goal>
<goal>compile</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# 1st stage, build the app
FROM ghcr.io/graalvm/graalvm-ce:java17-21.3.0 as build
FROM ghcr.io/graalvm/graalvm-ce:ol9-java17-22.3.0 as build

# Install native-image
RUN gu install native-image
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020, 2022 Oracle and/or its affiliates.
# Copyright (c) 2022 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,7 +14,5 @@
# limitations under the License.
#

#
# Graal native image supports additional configuration from this property file.
#
Args=-H:+RemoveSaturatedTypeFlows
# all Helidon classes should be designed for native image, exceptions configured in specific modules
Args=--initialize-at-build-time=io.helidon
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019, 2021 Oracle and/or its affiliates.
# Copyright (c) 2019, 2022 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,4 +14,5 @@
# limitations under the License.
#

Args=--initialize-at-build-time=io.helidon.config.yaml
Args=--initialize-at-build-time=io.helidon.config.yaml \
--initialize-at-build-time=org.yaml.snakeyaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019, 2020 Oracle and/or its affiliates.
# Copyright (c) 2019, 2022 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -15,4 +15,5 @@
#

Args= --initialize-at-build-time=org.slf4j \
--initialize-at-build-time=com.zaxxer.hikari \
--initialize-at-run-time=com.zaxxer.hikari.metrics.dropwizard.CodaHaleMetricsTracker
7 changes: 1 addition & 6 deletions dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<version.lib.google-oauth-client>1.33.3</version.lib.google-oauth-client>
<version.lib.google-error-prone>2.3.3</version.lib.google-error-prone>
<version.lib.google-protobuf>3.21.7</version.lib.google-protobuf>
<version.lib.graalvm>21.3.0</version.lib.graalvm>
<version.lib.graalvm>22.3.0</version.lib.graalvm>
<version.lib.graphql-java>17.4</version.lib.graphql-java>
<version.lib.graphql-java.extended.scalars>17.1</version.lib.graphql-java.extended.scalars>
<version.lib.gson>2.8.9</version.lib.gson>
Expand Down Expand Up @@ -969,11 +969,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.graalvm.nativeimage</groupId>
<artifactId>svm</artifactId>
<version>${version.lib.graalvm}</version>
</dependency>
<!-- Kafka support -->
<dependency>
<groupId>org.apache.kafka</groupId>
Expand Down
2 changes: 1 addition & 1 deletion docs/includes/guides/graalnative.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ set the `GRAALVM_HOME` environment variable to point at your GraalVM installatio
[source,bash]
----
# Your path might be different
export GRAALVM_HOME=/usr/local/graalvm-ce-21.3.0/Contents/Home/
export GRAALVM_HOME=/usr/local/graalvm-ce-22.3.0/Contents/Home/
----

Then install the optional `native-image` command:
Expand Down
34 changes: 17 additions & 17 deletions etc/dependency-check-suppression.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,119 +18,119 @@
-->
<suppress>
<notes><![CDATA[
file name: graal-sdk-21.3.0.jar
file name: graal-sdk-22.3.0.jar
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.graalvm\..*/.*@.*$</packageUrl>
<cve>CVE-2022-21248</cve>
</suppress>
<suppress>
<notes><![CDATA[
file name: graal-sdk-21.3.0.jar
file name: graal-sdk-22.3.0.jar
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.graalvm\..*/.*@.*$</packageUrl>
<cve>CVE-2022-21271</cve>
</suppress>
<suppress>
<notes><![CDATA[
file name: graal-sdk-21.3.0.jar
file name: graal-sdk-22.3.0.jar
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.graalvm\..*/.*@.*$</packageUrl>
<cve>CVE-2022-21277</cve>
</suppress>
<suppress>
<notes><![CDATA[
file name: graal-sdk-21.3.0.jar
file name: graal-sdk-22.3.0.jar
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.graalvm\..*/.*@.*$</packageUrl>
<cve>CVE-2022-21282</cve>
</suppress>
<suppress>
<notes><![CDATA[
file name: graal-sdk-21.3.0.jar
file name: graal-sdk-22.3.0.jar
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.graalvm\..*/.*@.*$</packageUrl>
<cve>CVE-2022-21283</cve>
</suppress>
<suppress>
<notes><![CDATA[
file name: graal-sdk-21.3.0.jar
file name: graal-sdk-22.3.0.jar
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.graalvm\..*/.*@.*$</packageUrl>
<cve>CVE-2022-21291</cve>
</suppress>
<suppress>
<notes><![CDATA[
file name: graal-sdk-21.3.0.jar
file name: graal-sdk-22.3.0.jar
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.graalvm\..*/.*@.*$</packageUrl>
<cve>CVE-2022-21293</cve>
</suppress>
<suppress>
<notes><![CDATA[
file name: graal-sdk-21.3.0.jar
file name: graal-sdk-22.3.0.jar
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.graalvm\..*/.*@.*$</packageUrl>
<cve>CVE-2022-21294</cve>
</suppress>
<suppress>
<notes><![CDATA[
file name: graal-sdk-21.3.0.jar
file name: graal-sdk-22.3.0.jar
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.graalvm\..*/.*@.*$</packageUrl>
<cve>CVE-2022-21296</cve>
</suppress>
<suppress>
<notes><![CDATA[
file name: graal-sdk-21.3.0.jar
file name: graal-sdk-22.3.0.jar
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.graalvm\..*/.*@.*$</packageUrl>
<cve>CVE-2022-21299</cve>
</suppress>
<suppress>
<notes><![CDATA[
file name: graal-sdk-21.3.0.jar
file name: graal-sdk-22.3.0.jar
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.graalvm\..*/.*@.*$</packageUrl>
<cve>CVE-2022-21305</cve>
</suppress>
<suppress>
<notes><![CDATA[
file name: graal-sdk-21.3.0.jar
file name: graal-sdk-22.3.0.jar
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.graalvm\..*/.*@.*$</packageUrl>
<cve>CVE-2022-21340</cve>
</suppress>
<suppress>
<notes><![CDATA[
file name: graal-sdk-21.3.0.jar
file name: graal-sdk-22.3.0.jar
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.graalvm\..*/.*@.*$</packageUrl>
<cve>CVE-2022-21341</cve>
</suppress>
<suppress>
<notes><![CDATA[
file name: graal-sdk-21.3.0.jar
file name: graal-sdk-22.3.0.jar
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.graalvm\..*/.*@.*$</packageUrl>
<cve>CVE-2022-21349</cve>
</suppress>
<suppress>
<notes><![CDATA[
file name: graal-sdk-21.3.0.jar
file name: graal-sdk-22.3.0.jar
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.graalvm\..*/.*@.*$</packageUrl>
<cve>CVE-2022-21360</cve>
</suppress>
<suppress>
<notes><![CDATA[
file name: graal-sdk-21.3.0.jar
file name: graal-sdk-22.3.0.jar
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.graalvm\..*/.*@.*$</packageUrl>
<cve>CVE-2022-21365</cve>
</suppress>
<suppress>
<notes><![CDATA[
file name: graal-sdk-21.3.0.jar
file name: graal-sdk-22.3.0.jar
]]></notes>
<packageUrl regex="true">^pkg:maven/org\.graalvm\..*/.*@.*$</packageUrl>
<cve>CVE-2022-21366</cve>
Expand Down
2 changes: 1 addition & 1 deletion etc/scripts/includes/pipeline-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if [ -z "${__PIPELINE_ENV_INCLUDED__}" ]; then
. ${WS_DIR}/etc/scripts/includes/error_handlers.sh

if [ -z "${GRAALVM_HOME}" ]; then
export GRAALVM_HOME="/tools/graalvm-ce-java17-21.3.0"
export GRAALVM_HOME="/tools/graalvm-ce-java17-22.3.0"
fi

require_env() {
Expand Down
2 changes: 1 addition & 1 deletion examples/integrations/neo4j/neo4j-mp/Dockerfile.native
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#

# 1st stage, build the app
FROM ghcr.io/graalvm/graalvm-ce:java17-21.3.0 as build
FROM ghcr.io/graalvm/graalvm-ce:ol9-java17-22.3.0 as build

# Install native-image
RUN gu install native-image
Expand Down
2 changes: 1 addition & 1 deletion examples/integrations/neo4j/neo4j-se/Dockerfile.native
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#

# 1st stage, build the app
FROM ghcr.io/graalvm/graalvm-ce:java17-21.3.0 as build
FROM ghcr.io/graalvm/graalvm-ce:ol9-java17-22.3.0 as build

# Install native-image
RUN gu install native-image
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#

# 1st stage, build the app
FROM ghcr.io/graalvm/graalvm-ce:java17-21.3.0 as build
FROM ghcr.io/graalvm/graalvm-ce:ol9-java17-22.3.0 as build

# Install native-image
RUN gu install native-image
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstarts/helidon-quickstart-mp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ You can build a native executable in 2 different ways:
### Local build

Download Graal VM at https://www.graalvm.org/downloads. We recommend
version `21.3.0` or later.
version `22.3.0` or later.

```
# Setup the environment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#

# 1st stage, build the app
FROM ghcr.io/graalvm/graalvm-ce:java17-21.3.0 as build
FROM ghcr.io/graalvm/graalvm-ce:ol9-java17-22.3.0 as build

# Install native-image
RUN gu install native-image
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstarts/helidon-quickstart-se/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ You can build a native executable in 2 different ways:
### Local build

Download Graal VM at https://www.graalvm.org/downloads. We recommend
version `21.3.0` or later.
version `22.3.0` or later.

```
# Setup the environment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#

# 1st stage, build the app
FROM ghcr.io/graalvm/graalvm-ce:java17-21.3.0 as build
FROM ghcr.io/graalvm/graalvm-ce:ol9-java17-22.3.0 as build

# Install native-image
RUN gu install native-image
Expand Down
Loading