Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Parse & validate GraalVM metadata META-INF/native-image#51189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
ljluestc wants to merge2 commits intoquarkusio:main
base:main
Choose a base branch
Loading
fromljluestc:native-image

Conversation

@ljluestc
Copy link

Changes Made

Core Implementation:

  • Created 5 new build items to carry parsed native-image metadata through the Quarkus build process:

    • NativeImagePropertiesBuildItem - for parsed command-line arguments fromnative-image.properties
    • NativeImageReflectConfigBuildItem - for reflection configuration JSON
    • NativeImageResourceConfigBuildItem - for resource configuration JSON
    • NativeImageJniConfigBuildItem - for JNI configuration JSON
    • NativeImageProxyConfigBuildItem - for proxy configuration JSON
  • ImplementedNativeImageMetadataParserStep - a new build step that:

    • Scans all dependencies forMETA-INF/native-image files
    • Parsesnative-image.properties files with complex argument handling (including quoted strings)
    • Validates JSON configuration files
    • Produces build items containing the parsed metadata
  • UpdatedNativeImageBuildStep andNativeImageInvokerInfo.Builder to consume parsed metadata and inject arguments directly into the native-image command line

Testing:

  • Added comprehensive unit tests for argument parsing logic and JSON validation
  • Created integration test modulenative-image-metadata-parser that verifies:
    • JVM functionality (resource bundle access with different locales)
    • Native image compilation success with metadata injection
    • End-to-end functionality

Key Features:

  • Automatic Discovery: Scans all dependency JARs for native-image metadata
  • Smart Parsing: Correctly handles complex command-line arguments including quoted strings and spaces
  • JSON Validation: Ensures configuration files contain valid JSON structures
  • Error Handling: Proper logging and graceful handling of malformed metadata
  • Backwards Compatibility: Maintains existing exclusion mechanisms as fallback

@geoand
Copy link
Contributor

Thanks for the contribution.

Can you elaborate on why this is useful for Quarkus?

@geoandgeoand added the triage/needs-feedbackWe are waiting for feedback. labelNov 28, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

area/coretriage/needs-feedbackWe are waiting for feedback.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@ljluestc@geoand

[8]ページ先頭

©2009-2025 Movatter.jp