build-native-image-gra…
Build GraalVM native images using Gradle Native Build Tools. Use this skill to build Java…
Build GraalVM native images using the native-maven-plugin (org.graalvm.buildtools). Use this skill to build Java applications with Maven, configure pom.xml native image settings, run native tests, collect metadata, or resolve build or runtime issues.
$ npx -y skills add oracle/graal --skill build-native-image-maven --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/build-native-image-mavenContext preview
The summary Claude sees to decide when to auto-load this skill.
Build GraalVM native images using the native-maven-plugin (org.graalvm.buildtools). Use this skill to build Java applications with Maven, configure pom.xml native image settings, run native tests, collect metadata, or resolve build or runtime issues.
name: build-native-image-maven description: Build GraalVM native images using the native-maven-plugin (org.graalvm.buildtools). Use this skill to build Java applications with Maven, configure pom.xml native image settings, run native tests, collect metadata, or resolve build or runtime issues.
Add the following to your `pom.xml` inside a `native` profile:
<profiles>
<profile>
<id>native</id>
<build>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>0.11.1</version>
<extensions>true</extensions>
<executions>
<execution>
<id>build-native</id>
<goals>
<goal>compile-no-fork</goal>
</goals>
<phase>package</phase>
</execution>
<execution>
<id>test-native</id>
<goals>
<goal>test</goal>
</goals>
<phase>test</phase>
</execution>
</executions>
<configuration>
<mainClass>org.example.Main</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>./mvnw -Pnative package # Build native image → target/<imageName> ./target/myapp # Run the native executable ./mvnw -Pnative test # Build and run JUnit tests as a native image ./mvnw -Pnative -DskipTests package # Skip all tests ./mvnw -Pnative -DskipNativeTests package # Run JVM tests only, skip native
For class initialization errors, linking issues, memory problems, or unexpected runtime behavior, see [references/maven-plugin-options.md](references/maven-plugin-options.md).
When native-image reports missing reflection, resources, serialization, or JNI entries, see [references/reachability-metadata.md](references/reachability-metadata.md).
For `nativeTest` failures or setting up native JUnit tests, see [references/testing.md](references/testing.md).
| Topic | File | |-------|------| | Plugin configuration options | [references/maven-plugin-options.md](references/maven-plugin-options.md) | | Missing reachability metadata | [references/reachability-metadata.md](references/reachability-metadata.md) | | Native testing | [references/testing.md](references/testing.md) |
GraalVM compiles applications into native executables that start instantly, scale fast, and use fewer compute resources 🚀
Repo: oracle/graal
Build GraalVM native images using Gradle Native Build Tools. Use this skill to build Java…
Build and troubleshoot GraalVM Native Image applications. Use this skill to build Java…
Reimport Native Image's vendored libcontainer from a newer JDK while preserving local…