Re: [MJLINK] Create JavaFX application runtime

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [MJLINK] Create JavaFX application runtime

Abhinay Agarwal
Hi Robert,

The issue can be reproduced using theJavaFX application hosted on Github
<https://github.com/abhinayagarwal/maven-jlink-plugin-javafx/>. It uses
the maven-jlink-plugin to create a native image and fails.

Ben's example hosted at https://github.com/alttpj/MemeforceHunt does
work and I was able to successfully apply the same logic to my
application. It needs the user to exclude the transitive dependency and
provide a platform classifier to make it work, which IMO isn't very idle
:). The working `pom.xml` is available here:
https://github.com/abhinayagarwal/maven-jlink-plugin-javafx/blob/working/pom.xml

-Abhinay


On 2021/04/01 10:39:48, "Robert Scholte" <[hidden email]> wrote:
 > I'm missing a project to reproduce the issue, but I would expect that
adding <scope>provided</scope> on those dependencies would fix it.>
 >
 > Robert>
 > On 1-4-2021 08:16:06, Abhinay Agarwal <[hidden email]> wrote:>
 > Hi,>
 >
 > I tried to create runtime images for JavaFX applications using
maven-jlink-plugin. The jlink:jlink goal fails as some JavaFX
dependencies are "Automatic Modules". More information on this can be
found here:
https://github.com/abhinayagarwal/maven-jlink-plugin-javafx/blob/master/README.md>

 >
 > maven-jlink-plugin extracts all the modules from the module-path and
adds them to the `--add-modules` list. The existing JavaFX Maven plugin
adds only the base module to the `--add-modules` list overcoming this
issue.>
 >
 > It would be great if the plugin can be extended to create runtimes
for JavaFX applications.>
 >
 > Best regards,>
 > Abhinay>
 >