build-native-image-maven

Build GraalVM native images for Java applications using the native-maven-plugin.

21.7k|1.8k|Updated Jan 14, 2016
One-click install
npx skills add https://github.com/oracle/graal --skill build-native-image-maven
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: build-native-image-maven
Source: https://github.com/oracle/graal/tree/main/substratevm/skills/build-native-image-maven
Command: npx skills add https://github.com/oracle/graal --skill build-native-image-maven

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill abstracts the complexity of building GraalVM native images from a Maven project by providing a guided workflow to configure, package, test, and troubleshoot native builds and related metadata within a single skill.

Core Features & Use Cases

  • Configure and use the native-maven-plugin to compile native images for Java applications.
  • Build, test, and run native images within a Maven project to verify behavior in production-like environments.
  • Collect metadata and diagnose common build/runtime issues related to native images, including debugging and troubleshooting.

Quick Start

Execute the Maven build with the native profile to generate the GraalVM native image for your Java application.

Frequently Asked Questions about build-native-image-maven

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a GraalVM native image from a Maven project?

To build a GraalVM native image from a Maven project, you configure the native-maven-plugin in your pom.xml and execute the Maven build with the native profile to compile the application.

What are the requirements to generate native images using the native-maven-plugin?

Generating native images using the native-maven-plugin requires a Maven installation, a GraalVM JDK, and access to a Java project with a properly configured pom.xml for the native build.

How do I test and run Java native images built with Maven?

You can test and run Java native images built with Maven by executing the native build and testing phases within your Maven project to verify application behavior in production-like environments.

Why does my GraalVM native image build fail and how do I debug it?

Debugging a failing GraalVM native image build involves collecting metadata and diagnosing common build or runtime issues using the guided workflow to troubleshoot configuration and compilation errors.

What is the purpose of collecting metadata when building native images with Maven?

Collecting metadata when building native images with Maven helps diagnose common build and runtime issues, ensuring the native-image compiler correctly resolves dynamic features in the Java application.

Can I configure a Maven profile specifically for packaging native images?

Yes, you can configure a Maven profile specifically for packaging native images by adding the native-maven-plugin to your pom.xml and triggering the build process through that dedicated profile.