From 1ccafad45f5e7fa9108b500c3940f6c30da0ba5c Mon Sep 17 00:00:00 2001 From: Joe Di Pol Date: Mon, 2 Oct 2023 15:23:03 -0700 Subject: [PATCH] Docs: Update maven, gradle, jlink, native-image guides --- docs/includes/attributes.adoc | 4 ++++ docs/includes/guides/graalnative.adoc | 8 +++---- docs/includes/guides/gradle-build.adoc | 3 +-- docs/includes/guides/jlink-image.adoc | 2 +- docs/includes/guides/maven-build.adoc | 30 +++----------------------- docs/includes/prerequisites.adoc | 2 +- 6 files changed, 14 insertions(+), 35 deletions(-) diff --git a/docs/includes/attributes.adoc b/docs/includes/attributes.adoc index 0919a1d5df3..491b4948fcc 100644 --- a/docs/includes/attributes.adoc +++ b/docs/includes/attributes.adoc @@ -273,6 +273,10 @@ endif::[] :openapi-generator-tool-generators-docs-url: {openapi-generator-tool-docs-url}/generators :openapi-generator-tool-site-url: https://openapi-generator.tech +// GraalVM +:graalvm-jdk-version: 21 +:graalvm-doc-url: https://www.graalvm.org/jdk{graalvm-jdk-version}/ + // OpenAPI UI :smallrye-openapi-ui-base-url: https://github.com/smallrye/smallrye-open-api/tree/{version-lib-smallrye-open-api}/ui/open-api-ui diff --git a/docs/includes/guides/graalnative.adoc b/docs/includes/guides/graalnative.adoc index 2d8116fe612..0116d0e0833 100644 --- a/docs/includes/guides/graalnative.adoc +++ b/docs/includes/guides/graalnative.adoc @@ -22,7 +22,7 @@ ifndef::rootdir[:rootdir: {docdir}/../..] == Introduction -https://www.graalvm.org/docs/reference-manual/aot-compilation/[Native images] are ahead-of-time compiled Java code +{graalvm-doc-url}reference-manual/native-image/[Native images] are ahead-of-time compiled Java code that result in a self contained native executable. When used appropriately native images have dramatically faster startup and lower runtime memory overhead compared to a Java VM. @@ -36,13 +36,13 @@ include::{rootdir}/includes/prerequisites.adoc[tag=prerequisites-graal] == Install GraalVM and the Native Image Command -After https://github.com/graalvm/graalvm-ce-builds/releases[downloading and installing] GraalVM, +After {graalvm-doc-url}/docs/getting-started/[downloading and installing] GraalVM, set the `GRAALVM_HOME` environment variable to point at your GraalVM installation. [source,bash] ---- # Your path might be different -export GRAALVM_HOME=/usr/local/graalvm-ce-22.3.0/Contents/Home/ +export GRAALVM_HOME=/usr/local/graalvm-jdk-21+35.1/Contents/Home/ ---- Then install the optional `native-image` command: @@ -173,7 +173,7 @@ Again, it starts fast. You can exercise the application's endpoints as before. Native images are ideal for applications with high horizontal scalability requirements where the ability to rapidly scale out to numerous instances is important. -That said, native images do have some https://github.com/oracle/graal/blob/master/substratevm/Limitations.md[limitations], +That said, native images do have some {graalvm-doc-url}reference-manual/native-image/metadata/Compatibility/[limitations], and for long running applications where startup and footprint are less of a priority, the Java SE HotSpot VM might be more appropriate. diff --git a/docs/includes/guides/gradle-build.adoc b/docs/includes/guides/gradle-build.adoc index 5f48b166e35..d037d103f85 100644 --- a/docs/includes/guides/gradle-build.adoc +++ b/docs/includes/guides/gradle-build.adoc @@ -21,7 +21,7 @@ ifndef::rootdir[:rootdir: {docdir}/../..] == Introduction While most of Helidon's examples use Maven, you can also use Helidon -with a Gradle project. We recommend Gradle 6+. +with a Gradle project. We recommend Gradle 7+. == Gradle Example @@ -54,4 +54,3 @@ dependencies { testCompileOnly 'org.junit.jupiter:junit-jupiter-api:' } ---- - diff --git a/docs/includes/guides/jlink-image.adoc b/docs/includes/guides/jlink-image.adoc index f8833e82087..1037cbffec4 100644 --- a/docs/includes/guides/jlink-image.adoc +++ b/docs/includes/guides/jlink-image.adoc @@ -37,7 +37,7 @@ include::{rootdir}/includes/prerequisites.adoc[tag=prerequisites] == Verify JDK -As noted in the prerequisites above, JDK 11 or newer is required. +As noted in the prerequisites above, JDK 21 or newer is required. [source,bash] ---- diff --git a/docs/includes/guides/maven-build.adoc b/docs/includes/guides/maven-build.adoc index 1353bf40ac8..5931b321960 100644 --- a/docs/includes/guides/maven-build.adoc +++ b/docs/includes/guides/maven-build.adoc @@ -95,8 +95,8 @@ You then declare dependencies on Helidon (and other) components without specifyi Helidon provides a Maven plugin that, among other things, provides the following goals: -1. native-image: Build a xref:{guidesdir}/graalnative.adoc[GraalVM native image]. -2. jlink-image: Build a xref:{guidesdir}/jlink-image.adoc[custom runtime Java image]. +1. jlink-image: Build a xref:{guidesdir}/jlink-image.adoc[custom runtime Java image]. +2. native-image: Build a xref:{guidesdir}/graalnative.adoc[GraalVM native image]. Note: this capability is now provided via the https://graalvm.github.io/native-build-tools/latest/maven-plugin.html[Maven plugin for GraalVM Native Image] For full documentation of the plugin please see the https://github.com/oracle/helidon-build-tools/tree/master/maven-plugins/helidon-maven-plugin[Helidon Maven Plugin README]. @@ -150,28 +150,4 @@ For full control you can override the plugin's configuration using `pluginManage ----- - -[source,xml] -.Override final name of native image binary ----- - - - - - io.helidon.build-tools - helidon-maven-plugin - - - native-image - - my-fantastic-service - - - - - - - ----- - +---- \ No newline at end of file diff --git a/docs/includes/prerequisites.adoc b/docs/includes/prerequisites.adoc index 129a765b7c8..b85ce9e10be 100644 --- a/docs/includes/prerequisites.adoc +++ b/docs/includes/prerequisites.adoc @@ -144,7 +144,7 @@ export JAVA_HOME=/usr/lib/jvm/jdk-21 [role="flex, sm7"] |======= include::prerequisites.adoc[tag=prerequisites-table-contents] -| https://github.com/graalvm/graalvm-ce-builds/releases/tag/vm-21.0.0[GraalVM CE 21.0.0]| +| https://www.graalvm.org/release-notes/JDK_21/[GraalVM for JDK 21]| |=======