From ec11095bc62b9bbe72f09253277ca1c2fb6d2228 Mon Sep 17 00:00:00 2001 From: Tomas Zezula Date: Thu, 13 Jun 2024 11:06:59 +0200 Subject: [PATCH] Resolved review comments. --- README.md | 5 +-- pom.xml | 108 ++++++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 98 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index e56750b..08e8a34 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,12 @@ https://www.graalvm.org/latest/reference-manual/embed-languages/ Download Maven or import as Maven project into your IDE. -* `mvn package` build using javac +* `mvn package` build using javac. Starting from GraalVM 24.1, you can use `mvn -Pisolated package` to build with the native isolate version of a guest language. By default, only the native isolate library for the current platform is installed. To install native isolate libraries for all supported platforms, use `mvn -Pisolated -Disolated.all.platforms package`. * `mvn test` to run the tests -* `mvn exec:exec` to run the Main application +* `mvn exec:exec` to run the Main application. Starting from GraalVM 24.1, you can use `mvn -Pisolated exec:exec` to utilize the native isolate version of a guest language. * `mvn -Pnative package` to build a native-image * `mvn -Passembly package` to build an uber JAR containing all dependencies using the Maven Assembly Plugin. The resulting JAR can be executed using `java -jar embedding-1.0-SNAPSHOT-jar-with-dependencies.jar`. We do recommend not using shading whenever possible. * `mvn -Pshade package` to build an uber JAR containing all dependencies using the Maven Shade Plugin. The resulting JAR can be executed using `java -jar embedding-1.0-SNAPSHOT.jar`. We do recommend not using shading whenever possible. -* `mvn -Pisolated package` to install native isolate versions of languages for the current platform Please see the [pom.xml](./pom.xml) file for further details on the configuration. diff --git a/pom.xml b/pom.xml index 6ddbe63..a09611c 100644 --- a/pom.xml +++ b/pom.xml @@ -411,7 +411,7 @@ --> - isolate-linux-amd64 + isolated-linux-amd64 unix @@ -420,12 +420,12 @@ - linux-amd64 + -linux-amd64 - isolate-linux-aarch64 + isolated-linux-aarch64 unix @@ -434,12 +434,12 @@ - linux-aarch64 + -linux-aarch64 - isolate-darwin-amd64 + isolated-darwin-amd64 mac @@ -447,12 +447,12 @@ - darwin-amd64 + -darwin-amd64 - isolate-darwin-aarch64 + isolated-darwin-aarch64 mac @@ -460,12 +460,12 @@ - darwin-aarch64 + -darwin-aarch64 - isolate-windows-amd64 + isolated-windows-amd64 windows @@ -473,20 +473,104 @@ - windows-amd64 + -windows-amd64 + + + isolated-all-platforms + + + isolated.all.platforms + + + + + + + isolated + + js + org.graalvm.polyglot - js-isolate-${isolate.platform} + js-isolate${isolate.platform.suffix} + ${graalvm.version} + pom + + + org.graalvm.polyglot + js ${graalvm.version} pom + provided + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.1.2 + + + ${isolated.language.id} + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + + + exec + + + + no-runtime-compilation + + exec + + + ${java.home}/bin/java + + -Dpolyglot.engine.SpawnIsolate=${isolated.language.id} + + --module-path + + -m + embedding/org.example.embedding.Main + + + + + + ${java.home}/bin/java + + -Dpolyglot.engine.SpawnIsolate=${isolated.language.id} + + --module-path + + -m + embedding/org.example.embedding.Main + + + + + -