Skip to content

Commit

Permalink
Docs: Update maven, gradle, jlink, native-image guides
Browse files Browse the repository at this point in the history
  • Loading branch information
barchetta committed Oct 2, 2023
1 parent 785a87f commit 1ccafad
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 35 deletions.
4 changes: 4 additions & 0 deletions docs/includes/attributes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions docs/includes/guides/graalnative.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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:
Expand Down Expand Up @@ -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.
Expand Down
3 changes: 1 addition & 2 deletions docs/includes/guides/gradle-build.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -54,4 +54,3 @@ dependencies {
testCompileOnly 'org.junit.jupiter:junit-jupiter-api:'
}
----
2 changes: 1 addition & 1 deletion docs/includes/guides/jlink-image.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
----
Expand Down
30 changes: 3 additions & 27 deletions docs/includes/guides/maven-build.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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].
Expand Down Expand Up @@ -150,28 +150,4 @@ For full control you can override the plugin's configuration using `pluginManage
</plugins>
</pluginManagement>
</build>
----
[source,xml]
.Override final name of native image binary
----
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>io.helidon.build-tools</groupId>
<artifactId>helidon-maven-plugin</artifactId>
<executions>
<execution>
<id>native-image</id>
<configuration>
<finalName>my-fantastic-service</finalName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
----
----
2 changes: 1 addition & 1 deletion docs/includes/prerequisites.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]|
|=======
Expand Down

0 comments on commit 1ccafad

Please sign in to comment.