Maven plugin with helper methods for generating native configuration
This maven plugin allows generation of graalvm metadata using the native-helper-graalvm
Write a native-helper-config.yaml configuration file for the project. (configuration reference here)
<plugin>
<groupId>org.fugerit.java</groupId>
<artifactId>native-helper-maven-plugin</artifactId>
<version>${native-helper-maven-plugin-version}</version>
<executions>
<execution>
<id>generate-native-configuration</id>
<phase>prepare-package</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<createParentDirectory>true</createParentDirectory>
<nativeHelperConfigPath>${project.basedir}/src/main/config/native-helper-config.yaml</nativeHelperConfigPath>
<reflectConfigJsonOutputPath>${project.build.directory}/generated-resources/reflect-config-demo.json</reflectConfigJsonOutputPath>
<warnOnError>false</warnOnError>
</configuration>
</execution>
</executions>
</plugin>
name | default | required | type | description |
---|---|---|---|---|
nativeHelperConfigPath | none | true | string | Path to native-helper-config.yaml configuration file |
reflectConfigJsonOutputPath | none | false | string | generation path for reflect-config.json file |
createParentDirectory | false | false | boolean | if set to true will create reflectConfigJsonOutputPath parent folder |
warnOnError | false | false | boolean | if set to true exception will be logged instead of generating a build error |
<plugin>
<groupId>org.fugerit.java</groupId>
<artifactId>native-helper-maven-plugin</artifactId>
<version>${native-helper-maven-plugin-version}</version>
<executions>
<execution>
<id>merge-native-configuration</id>
<phase>prepare-package</phase>
<goals>
<goal>merge</goal>
</goals>
<configuration>
<reflectConfigJsonFiles>
<reflectConfigJsonFile>${project.build.directory}/generated-resources/reflect-config-demo.json</reflectConfigJsonFile>
<reflectConfigJsonFile>${project.basedir}/src/main/config/reflect-config-nhg.json</reflectConfigJsonFile>
</reflectConfigJsonFiles>
<reflectConfigJsonOutputPath>${project.build.outputDirectory}/META-INF/native-image/reflect-config.json</reflectConfigJsonOutputPath>
<createParentDirectory>true</createParentDirectory>
<warnOnError>true</warnOnError>
</configuration>
</execution>
</executions>
</plugin>
name | default | required | type | description |
---|---|---|---|---|
reflectConfigJsonFiles.reflectConfigJsonFile | none | true | string | List of reflect-config.json files to merge |
reflectConfigJsonOutputPath | none | true | string | generation path for reflect-config.json file |
createParentDirectory | false | false | boolean | if set to true will create reflectConfigJsonOutputPath parent folder |
warnOnError | false | false | boolean | if set to true exception will be logged instead of generating a build error |
Here is a simple demo project