-
Notifications
You must be signed in to change notification settings - Fork 228
Added config generator for GraalVM and updated config. #1744
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -550,5 +550,23 @@ | |||||
| </plugins> | ||||||
| </build> | ||||||
| </profile> | ||||||
| <!-- Profile to generate native-image reachability metadata by running tests with the GraalVM agent --> | ||||||
| <profile> | ||||||
| <id>native-image-agent</id> | ||||||
| <properties> | ||||||
| <native.image.agent.output.dir>${project.basedir}/src/main/resources/META-INF/native-image</native.image.agent.output.dir> | ||||||
| </properties> | ||||||
| <build> | ||||||
| <plugins> | ||||||
| <plugin> | ||||||
| <groupId>org.apache.maven.plugins</groupId> | ||||||
| <artifactId>maven-surefire-plugin</artifactId> | ||||||
| <configuration> | ||||||
| <argLine>${surefire.argline} -agentlib:native-image-agent=config-output-dir=${native.image.agent.output.dir}</argLine> | ||||||
|
||||||
| <argLine>${surefire.argline} -agentlib:native-image-agent=config-output-dir=${native.image.agent.output.dir}</argLine> | |
| <argLine>${surefire.argline} -agentlib:native-image-agent=config-merge-dir=${native.image.agent.output.dir}</argLine> |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,255 @@ | ||||||||||
| [ | ||||||||||
| { | ||||||||||
| "name":"[Lsun.java2d.loops.GraphicsPrimitive;" | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"com.apple.eawt._AppEventHandler", | ||||||||||
| "methods":[{"name":"handleNativeNotification","parameterTypes":["int"] }] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"com.apple.eawt._AppMenuBarHandler", | ||||||||||
| "methods":[{"name":"initMenuStates","parameterTypes":["boolean","boolean","boolean","boolean"] }] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"com.sun.imageio.plugins.jpeg.JPEGImageReader", | ||||||||||
| "methods":[{"name":"acceptPixels","parameterTypes":["int","boolean"] }, {"name":"passComplete","parameterTypes":[] }, {"name":"passStarted","parameterTypes":["int"] }, {"name":"pushBack","parameterTypes":["int"] }, {"name":"readInputData","parameterTypes":["byte[]","int","int"] }, {"name":"setImageData","parameterTypes":["int","int","int","int","int","byte[]"] }, {"name":"skipInputBytes","parameterTypes":["long"] }, {"name":"skipPastImage","parameterTypes":["int"] }, {"name":"warningOccurred","parameterTypes":["int"] }, {"name":"warningWithMessage","parameterTypes":["java.lang.String"] }] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"com.sun.imageio.plugins.jpeg.JPEGImageWriter", | ||||||||||
| "methods":[{"name":"grabPixels","parameterTypes":["int"] }, {"name":"warningOccurred","parameterTypes":["int"] }, {"name":"warningWithMessage","parameterTypes":["java.lang.String"] }, {"name":"writeMetadata","parameterTypes":[] }, {"name":"writeOutputData","parameterTypes":["byte[]","int","int"] }] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"java.awt.AlphaComposite", | ||||||||||
| "fields":[{"name":"extraAlpha"}, {"name":"rule"}] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"java.awt.Color", | ||||||||||
| "methods":[{"name":"getRGB","parameterTypes":[] }] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"java.awt.DisplayMode", | ||||||||||
| "methods":[{"name":"<init>","parameterTypes":["int","int","int","int"] }] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"java.awt.event.InputEvent", | ||||||||||
| "methods":[{"name":"getButtonDownMasks","parameterTypes":[] }] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"java.awt.geom.AffineTransform", | ||||||||||
| "fields":[{"name":"m00"}, {"name":"m01"}, {"name":"m02"}, {"name":"m10"}, {"name":"m11"}, {"name":"m12"}] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"java.awt.geom.Path2D", | ||||||||||
| "fields":[{"name":"numTypes"}, {"name":"pointTypes"}, {"name":"windingRule"}] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"java.awt.geom.Path2D$Float", | ||||||||||
| "fields":[{"name":"floatCoords"}] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"java.awt.geom.Rectangle2D$Double", | ||||||||||
| "methods":[{"name":"<init>","parameterTypes":["double","double","double","double"] }] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"java.awt.image.BufferedImage", | ||||||||||
| "fields":[{"name":"colorModel"}, {"name":"imageType"}, {"name":"raster"}], | ||||||||||
| "methods":[{"name":"getRGB","parameterTypes":["int","int","int","int","int[]","int","int"] }, {"name":"setRGB","parameterTypes":["int","int","int","int","int[]","int","int"] }] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"java.awt.image.ColorModel", | ||||||||||
| "fields":[{"name":"colorSpace"}, {"name":"colorSpaceType"}, {"name":"isAlphaPremultiplied"}, {"name":"is_sRGB"}, {"name":"nBits"}, {"name":"numComponents"}, {"name":"pData"}, {"name":"supportsAlpha"}, {"name":"transparency"}], | ||||||||||
| "methods":[{"name":"getRGBdefault","parameterTypes":[] }] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"java.awt.image.IndexColorModel", | ||||||||||
| "fields":[{"name":"allgrayopaque"}, {"name":"colorData"}, {"name":"map_size"}, {"name":"rgb"}, {"name":"transparent_index"}] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"java.awt.image.Raster", | ||||||||||
| "fields":[{"name":"dataBuffer"}, {"name":"height"}, {"name":"minX"}, {"name":"minY"}, {"name":"numBands"}, {"name":"numDataElements"}, {"name":"sampleModel"}, {"name":"sampleModelTranslateX"}, {"name":"sampleModelTranslateY"}, {"name":"width"}] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"java.awt.image.SampleModel", | ||||||||||
| "fields":[{"name":"height"}, {"name":"width"}], | ||||||||||
| "methods":[{"name":"getPixels","parameterTypes":["int","int","int","int","int[]","java.awt.image.DataBuffer"] }, {"name":"setPixels","parameterTypes":["int","int","int","int","int[]","java.awt.image.DataBuffer"] }] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"java.awt.image.SinglePixelPackedSampleModel", | ||||||||||
| "fields":[{"name":"bitMasks"}, {"name":"bitOffsets"}, {"name":"bitSizes"}, {"name":"maxBitSize"}] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"java.lang.String", | ||||||||||
| "methods":[{"name":"lastIndexOf","parameterTypes":["int"] }, {"name":"substring","parameterTypes":["int"] }] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"java.lang.System", | ||||||||||
| "methods":[{"name":"getProperty","parameterTypes":["java.lang.String"] }, {"name":"load","parameterTypes":["java.lang.String"] }, {"name":"setProperty","parameterTypes":["java.lang.String","java.lang.String"] }] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"javax.imageio.plugins.jpeg.JPEGHuffmanTable", | ||||||||||
| "fields":[{"name":"lengths"}, {"name":"values"}] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"javax.imageio.plugins.jpeg.JPEGQTable", | ||||||||||
| "fields":[{"name":"qTable"}] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
| "name":"org.apache.maven.surefire.booter.ForkedBooter", | ||||||||||
| "methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }] | ||||||||||
| }, | ||||||||||
| { | ||||||||||
|
Comment on lines
+97
to
+100
|
||||||||||
| "name":"org.apache.maven.surefire.booter.ForkedBooter", | |
| "methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }] | |
| }, | |
| { |
Copilot
AI
Jan 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The jni-config.json contains extensive AWT/Swing/ImageIO configurations that may not be necessary for Datafaker's core functionality. These were likely captured during test execution if tests use any UI components or image processing. Consider reviewing whether AWT/Swing support is needed for production use cases, as including these significantly increases native image size and build time.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| [ | ||
| { | ||
| "type":"agent-extracted", | ||
| "classes":[ | ||
| ] | ||
| } | ||
| ] | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| [ | ||
| { | ||
| "interfaces":["net.bytebuddy.description.method.MethodDescription$InDefinedShape$AbstractBase$Executable"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.method.ParameterDescription$ForLoadedParameter$Parameter"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.method.ParameterList$ForLoadedExecutable$Executable"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDefinition$Sort$AnnotatedType"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription$ForLoadedType$Dispatcher"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription$Generic"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription$Generic$AnnotationReader$Delegator$ForLoadedExecutableExceptionType$Dispatcher"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription$Generic$AnnotationReader$Delegator$ForLoadedExecutableParameterType$Dispatcher"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription$Generic$AnnotationReader$Delegator$ForLoadedField$Dispatcher"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription$Generic$AnnotationReader$Delegator$ForLoadedMethodReturnType$Dispatcher"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription$Generic$AnnotationReader$ForComponentType$AnnotatedParameterizedType"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription$Generic$AnnotationReader$ForOwnerType$AnnotatedType"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription$Generic$AnnotationReader$ForTypeArgument$AnnotatedParameterizedType"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription$Generic$AnnotationReader$ForTypeVariableBoundType$AnnotatedTypeVariable"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription$Generic$AnnotationReader$ForTypeVariableBoundType$OfFormalTypeVariable$FormalTypeVariable"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.description.type.TypeDescription$Generic$AnnotationReader$ForWildcardUpperBoundType$AnnotatedWildcardType"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.utility.JavaConstant$Simple$Dispatcher"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.utility.JavaConstant$Simple$Dispatcher$OfClassDesc"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.utility.JavaConstant$Simple$Dispatcher$OfDirectMethodHandleDesc"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.utility.JavaConstant$Simple$Dispatcher$OfDirectMethodHandleDesc$ForKind"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.utility.JavaConstant$Simple$Dispatcher$OfDynamicConstantDesc"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.utility.JavaConstant$Simple$Dispatcher$OfMethodHandleDesc"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.utility.JavaConstant$Simple$Dispatcher$OfMethodTypeDesc"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.utility.JavaModule$Module"] | ||
| }, | ||
| { | ||
| "interfaces":["net.bytebuddy.utility.JavaModule$Resolver"] | ||
| } | ||
| ] | ||
|
Comment on lines
+1
to
+80
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation mentions "a reachability-metadata.json file" (singular) but the native-image-agent generates multiple configuration files (reflect-config.json, resource-config.json, jni-config.json, proxy-config.json, serialization-config.json, and predefined-classes-config.json). The documentation should clarify that multiple metadata files are generated and list them for clarity.