I was building a JavaFX app for Drifty project. I am using GluonFX-Maven-Plugin to build native images for the app.
Problem
A problem arises when I pass -o Drifty GUI as a native-image arg in the plugin configuration.
The GraalVM part of the plugin's process runs smooth. But, after this step, the plugin tries to find a C object with the name identical to the main class name, which it fails to find. Hence, it throws an error as shown below -
[Sat Sep 02 21:17:13 IST 2023][INFO] Additional information: Objectfile should be called gui.forms.main.o but we didn't find that under /home/saptarshi-sarkar/Drifty/target/gluonfx/x86_64-linux/gvm
[Sat Sep 02 21:17:13 IST 2023][SEVERE] Compiling failed.
Possible Solution
A feature can be included in the plugin to get the name of the App (in this caseDrifty GUI) from the pom file, and search for it in the target directory.
My pom.xml file
```xml
4.0.0com.DriftyDrifty2.0.0DriftyUTF-85.10.0201.0.190.9.23GUI.Forms.MainCLI.Drifty_CLI2.15.03.11.00.0.8org.openjfxjavafx-controls${javafx.version}org.junit.jupiterjunit-jupiter-api${junit.version}testorg.junit.jupiterjunit-jupiter-engine${junit.version}testorg.yamlsnakeyaml2.2commons-iocommons-io2.13.0com.google.code.gsongson2.10.1org.hildan.fxgsonfx-gson5.0.0org.apache.commonscommons-text1.10.0org.buildobjectsjproc2.8.2org.apache.maven.pluginsmaven-compiler-plugin${maven-compiler-plugin}2020org.codehaus.mojoversions-maven-plugin${versions-maven-plugin}org.openjfxjavafx-maven-plugin${javafx-maven-plugin}${guiMain}com.gluonhqgluonfx-maven-plugin${gluonfx-maven-plugin.version}${guiMain}${system-linker-arg}--enable-url-protocols=https--enable-url-protocols=http--no-fallback--verbose-H:ResourceConfigurationFiles=${pom.basedir}/config/${resource-config-file}--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk=ALL-UNNAMED-o Drifty GUI${system-native-image-arg}Drifty GUIDriftyDrifty is an open-source interactive file downloader system${package.type}${project.version}${project.version}truebuild-drifty-cli-for-windows-latestresource-config-windows.jsonorg.graalvm.buildtoolsnative-maven-plugin${native-maven-plugin.version}trueDrifty CLI${cliMain}target/CLI/windows--enable-url-protocols=https--enable-url-protocols=http-H:ResourceConfigurationFiles=${pom.basedir}/config/${resource-config-file}--no-fallback-H:+ReportExceptionStackTraces--verbosebuildbuildpackagebuild-drifty-cli-for-ubuntu-latestresource-config-linux.jsonorg.graalvm.buildtoolsnative-maven-plugin${native-maven-plugin.version}trueDrifty CLI${cliMain}target/CLI/linux--enable-url-protocols=https--enable-url-protocols=http-H:ResourceConfigurationFiles=${pom.basedir}/config/${resource-config-file}--no-fallback-H:+ReportExceptionStackTraces--verbosebuildbuildpackagebuild-drifty-cli-for-macos-latestresource-config-mac.jsonorg.graalvm.buildtoolsnative-maven-plugin${native-maven-plugin.version}trueDrifty CLI${cliMain}target/CLI/macos--enable-url-protocols=https--enable-url-protocols=http-H:ResourceConfigurationFiles=${pom.basedir}/config/${resource-config-file}--no-fallback-H:+ReportExceptionStackTraces--verbosebuildbuildpackagebuild-drifty-gui-for-macos-latestpkg-Dsvm.platform=org.graalvm.nativeimage.Platform$MACOS_AMD64${pom.basedir}/config/missing_symbols-macos-latest.oresource-config-mac.jsontruebuild-drifty-gui-for-ubuntu-latest${pom.basedir}/config/missing_symbols-ubuntu-latest.oresource-config-linux.jsonbuild-drifty-gui-for-windows-latestmsi${pom.basedir}/config/missing_symbols-windows-latest.oresource-config-windows.json
```
I was building a JavaFX app for Drifty project. I am using GluonFX-Maven-Plugin to build native images for the app.
Problem
Possible Solution
A feature can be included in the plugin to get the name of the App (in this case Drifty GUI) from the pom file, and search for it in the target directory.
My pom.xml file
```xml