Build Native Image MavenSAFE
GraalVM compiles applications into native executables that start instantly, scale fast, and use fewer compute resources ๐
Overview
GraalVM compiles applications into native executables that start instantly, scale fast, and use fewer compute resources ๐
3d75dfee24b3OBSERVED ยท 2026-10-03What it tells the agent
The instruction file, verbatim from the audited commit โ this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
---
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.
---
# Maven Native Image Build
## Prerequisites
- Set `JAVA_HOME` to a GraalVM JDK installation so the plugin can find `native-image`.
- Do not require `GRAALVM_HOME` in the normal case. Only mention it if the user already relies on it or their environment needs an explicit override.
- Use Maven 3.6+.
## Plugin Setup
Add the following to your `pom.xml` inside a `native` profile:
```xml
<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>
```
## Build and Run
```bash
./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
```
## Plugin Not Resolving or Activating
- **"Could not resolve artifact"** โ Ensure `mavenCentral()` is in repositories and the version is correct.
- **"Could not find goal 'compile-no-fork'"** โ Verify `<extensions>true</extensions>` is set on the plugin.
- **Build runs without native compilation** โ Check you are activating the profile: `./mvnw -Pnative package`.
## Build or Runtime Failures
For class initialization errors, linking issues, memory problems, or unexpected runtime behavior, see [references/maven-plugin-options.md](references/maven-plugin-options.md).
## Missing Reachability Metadata
When native-image reports missing reflection, resources, serialization, or JNI entries, see [references/reachability-metadata.md](references/reachability-metadata.md).
## Native Testing
For `nativeTest` failures or setting up native JUnit tests, see [references/testing.md](references/testing.md).
## Reference Files
| 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) |Trust audit
SAFEgrade B ยท trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | WARN |
| L1 | Static analysis of the code | NA |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (1)
web-image/mx.web-image/eclipse-settings
Gates applied: no_behavioural_pass.
3d75dfee24b3full audit observations/trust-audit/skill/oracle__build-native-image-maven.json ยท Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-03 | 3d75dfee24b3 | SAFE | B | 89 | first audit |
Questions
What does the Build Native Image Maven skill do?
GraalVM compiles applications into native executables that start instantly, scale fast, and use fewer compute resources ๐
Is Build Native Image Maven safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Build Native Image Maven access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
How current is this page?
The grade is for one exact copy of the source (3d75dfee24b3), read on 2026-10-03. The repository is watched, and a new audit runs when it changes โ this is the first audit.