设计与多媒体

java-add-graalvm-native-image-support

github/awesome-copilot

GraalVM Native Image skill for Spring Boot, Micronaut and plain Java: detects the build tool and framework, adds native image support, builds the executable, analyzes errors, and iterates until the native build succeeds and the binary runs correctly. For Quarkus projects it only dispatches to the quarkus-native-and-container skill.

  • 8722 次安装
  • 4.1万 星标
  • 收录于

安装命令

npx skills add https://github.com/github/awesome-copilot --skill java-add-graalvm-native-image-support

要点

Automate GraalVM native image configuration, build, and error resolution for Java applications.

  • Detects project structure (Maven/Gradle) and framework (Spring Boot, Quarkus, Micronaut) to apply framework-specific native image setup
  • Adds GraalVM Native Build Tools plugins with appropriate configuration profiles and iteratively resolves build errors
  • Handles common native image issues including reflection, resource access, JNI, and dynamic proxy configuration through generated metadata files
  • Provides framework-specific guidance: Spring Boot RuntimeHints registration, Quarkus @RegisterForReflection patterns, and Micronaut @Introspected annotations

SKILL.md

GraalVM Native Image Support

Single source of truth for adding GraalVM Native Image to a Java project, whatever the framework. Work iteratively: configure, build, read the error, fix, rebuild, until the native build succeeds and the executable runs correctly.

Detail lives in references/; load only what the project needs:

Topic File
Maven / Gradle native plugin setup references/build-tools.md
Reachability metadata and tracing agent references/reachability-metadata.md
Common build/runtime errors and fixes references/troubleshooting.md
Spring Boot (AOT, -Pnative, nativeCompile, build-image) references/spring-boot.md
Quarkus quarkus-native-and-container skill (hand off); short pointer in references/quarkus.md
Micronaut references/micronaut.md

Step 1: Analyze the project