gluonfx-maven-plugin | simplifies creating native images for Java/JavaFX maven | Plugin library
kandi X-RAY | gluonfx-maven-plugin Summary
kandi X-RAY | gluonfx-maven-plugin Summary
Plugin that simplifies creating native images for Java/JavaFX maven projects
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Entry point for substration
- Create filter file
- Entry point for the mojo
- Modifies the grails configuration
- Executes the building of the project
- Compile the main class
- Create repository system
- Installs the Substrate
- Execute the link
- Package - private
- Executes the native shared library
- Compares this AttachServiceDefinition with the specified name
- Get the supported target for the platform
- Creates a RepositorySystemSession
gluonfx-maven-plugin Key Features
gluonfx-maven-plugin Examples and Code Snippets
Community Discussions
Trending Discussions on gluonfx-maven-plugin
QUESTION
I am following the documentation given by Gluon : here.
To try to make it simple I'll try to go straight to the point giving the milestones I got through, and where I'm stuck.
--------- ENVIRONNEMENT :
OS : Windows 10 x64
IDE : Eclipse, Version: 2021-12 (4.22.0)
JAVA : jdk17.0.1
JAVAFX : javafx-sdk-17.0.1
GraalVM : graalvm-svm-java17-windows-gluon-22.0.0.2-Final
Gluon plugin for Eclipse : 2.8.2
Visual Studio : 1.63.2 (with all required extensions as described in document)
Wix : 3.11.2.24516
--------- CONFIGURATION
Maven : apache-maven-3.8.4
Pom : Here is an screenshot of the first part of my POM which can be found here.
Environment Variables : JAVA_HOME + GRAALVM_HOME + MAVEN_HOME
--------- DONE :
JavaFX(v17) Application :
- Running perfectly with direct RUN using regular JVM.
- Running perfectly with javafx:compile as proposed in Gluon's documentation
--------- PROBLEM :
Impossible to get the Gluon goal "mvn gluonfx:build" or "gluonfx:build" to complete! Here is what I do :
- As instructed to do here : "If you are running on Windows, you need to run all the GluonFX goals from a x64 terminal.", I open a "x64 Native Tools Command Prompt for VS 2022"
- Navigated to my project folder where the POM is.
- Runned the instruction
mvn gluonfx:build
. I also tried to follow the instruction suggesting to "open the Run Configurations… window and update the Goal to gluonfx:build and click Run". Both leads to a FAIL ! At the end of this post is the terminal report showing :
- I do run with the option mentioned --allow-incomplete-classpath.
- I do find the reported 'missing' cached_scope_id in the file jniconfig-x86_64-windows.json which is exactly on the mentioned path. Here is the file if needed.
I am trying since days to turn around everything, and searched the net for some clues... But no luck until now :-(... Can anyone help me sort this out please ?
PS. I do use an external DLL (yes, Windows only, but hey : we are trying here to make a NATIVE build, thus, in Windows ;-), should be ok); This DLL is JNI attached. I tried to play around with this as well... No luck.
--------- TERMINAL REPORT :
(Full log as mentioned, here)
ANSWER
Answered 2022-Feb-08 at 10:37José Pereda, which has an amazing 'Coding Blog' here, spotted that my plugin version was outdated.
He pointed out that there are 2 plugins used in the development process :
- The IDE one, in my case Eclipse, which the latest as of 2022.02.08, is 2.8.2.
- The 'POM' one, which was set by default to 1.0.8, and I had to set as 1.0.12.
That solved the problem described in my question. Here is a screenshot of the updated POM, which can be found here :
Another issue I found was my custom argument--allow-incomplete-classpath
for the native build was set incorrectly. It has to be set in the 'POM' in the plugin/configuration section as follows (same POM referenced already) :
These 2 modifications allowed me to have a completed build, and my 'exe' file was created !
QUESTION
I have a JavaFX-based desktop app, for which I create native images via GraalVM/GluonFX. To retrieve the version of the app during runtime, I previously – when there was only a fat JAR of the app – used Package#getImplementationVersion()
. However, this returns null
.
I assume this is because I don't set the manifest entries properly? My configuration of the gluonfx-maven-plugin
:
ANSWER
Answered 2021-Dec-21 at 17:56Let say you have a Maven project and you add to your main Application class:
QUESTION
GraalVM version: 21.2.0 JavaFX version: 17.0.0.1 Maven version: 3.6.3
I'm very close to be able to run my native image, I added classes to my reflectionlist in the pom.xml etc. but now I'm grinding to a halt because of a resourcebundle not found error. If anyone could give me a hint, that would be much appreciated.
Here's my pom.xml:
...ANSWER
Answered 2021-Oct-09 at 21:04Thanks to Jose Pereda, adding the above bundle to to the
gluonfx-maven-plugin
worked, even though IntelliJ didn't show this path as having a bundle with that name.
QUESTION
I am working through instructions on a document provided by Gluon: https://docs.gluonhq.com/#platforms_android and have attempted the following command on my Ubuntu desktop CLI:
...ANSWER
Answered 2021-Sep-23 at 16:39I was able to get the gluonfx:package command to run successfully after fixing the following errors that were pointed out by @JosePerada in the comments.
(1) I removed the environment variables to ANDROID_SDK and ANDROID_NDK. Then, from within Android Studio, I went ahead and removed the NDK(Side by side) package that I had configured in earlier, mistakenly thinking it might be of help.
(2) I changed the value held in GRAALVM_HOME to a subfile of ~/home/ and moved the Graalvm files as well, to match. This was one of several options. The key is that files are downloaded to within this folder, so write privileges are needed. If I leave it in /usr/lib
, either sudo or a user with write privileges for the area will need to run the gluonfx:package
command. Simplest seem to me to just put it in my user's home area where I already have write privileges.
Once these changes were done, the following command gave "BUILD_SUCCESS" messages for both gluonfx:build and gluonfx:package.
OK, on to attempting to install and run the app on my device. I wonder what I will get wrong about this next step.
QUESTION
I'm working through Gluon's online documentation for Gluon-Mobile, for the Android Platform, on my Ubuntu 20.04 desktop. I attempted to follow this instruction directly from my CLI (not from Eclipse).
To install the application to a connected android device, run mvn -Pandroid gluonfx:install.
This is puzzling to me, as I don't understand how the device which I have attached to my Ubuntu desktop (via USB) is going to be sensed. I have successfully compiled to the Android device before, when using AndroidStudio, as it has a control that allows one to choose the connected phone as the target.
Upon running the commands (thinking that I'd perhaps be asked to identify the target device or that it might somehow be sensed automatically), I got the following exception:
...ANSWER
Answered 2021-Sep-23 at 16:49The answer given by @JoséPereda in the comments seems to me like something we can post to resolve this particular question. He writes that in order to run the app on the device, the app must first be packaged.
Thus, if I understand this and if it hasn't already been corrected, the steps mentioned in section https://docs.gluonhq.com/#platforms_android_development_run should actually come after packaging, which is discussed in the section https://docs.gluonhq.com/#platforms_android_distribution_build.
QUESTION
I hope this isn't a simple error pertaining to a misuse of environment variables!
[EDIT: YEP that's what happened. I think I might just delete this whole question so as not to clog the topic for other Gluon/Graavlm questions.]
The Gluon documentation for creating an Android build has us execute the following command:
...ANSWER
Answered 2021-Sep-16 at 22:09Answer that was spotted by @Jose Perdida: use of sudo
took us out of the user environment where the environment variables were declared.
QUESTION
I just want to produce the native image for Windows platform from example Gluon project, but I get an error. I already install all the requirements. When run mvn gluonfx:compile
I get no error, but when I run mvn gluonfx:link
, I get this error:
ANSWER
Answered 2021-Jun-30 at 13:45Thank José Pereda for giving the hint to solve this error with this GitHub issue.
First, we need to add the plugin repository to the pom:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gluonfx-maven-plugin
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page