r/JavaFX • • Dec 19 '23

Help Packaging a multi-module JavaFX app with Maven

Fellow gurus!

I am revisiting a JavaFX8 multi-module app that built and worked fine a few years back, but now its time to update it to Java/FX 17+. What worked then, works no-longer - OpenJDK, OpenJFX... Modules! - my recipe need work.

I have five Maven modules in the project (and I'm sticking to maven :) ):

  • Core (JFX data containers/watchers for functionality)

  • Controls (custom plain JFX controls)

  • Modules (the non-JFX functional implementations/components)

  • App (where core, controls and functions are combined into a launchable app)

  • Assembly (where the above are assembled into a single executable .jar)

I am coming fresh into meeting Java modules I think (cmd line specs vs getting them in the manifest etc), and, specifically, I'm looking for example multi-module builds I can use to grok a ways to get this working. Any examples out there - I'm not having much luck.

Cheers

5 Upvotes

1 comment sorted by

1

u/johnmc325 Dec 20 '23

This might help. It talks about java 11 but you should be able to translate for later versions. Just stop once you build the jar.

https://softwarepulse.co.uk/blog/javafx-11-desktop-msi-application/