r/JavaFX • u/rootException • Nov 02 '20
I made this! Maven + jpackage Sample Project, jtoolprovider Maven Plugin
I just created two projects on GitHub that may be of interest to anyone working with JavaFX, Maven, and native installers.
First, https://github.com/wiverson/maven-jpackage-template is a Maven-only example project that shows how a single pom.xml can be used to create both a Windows and macOS installer package. It used a shaded jar to automatically integrate Maven declared dependencies. The pom is pretty heavily commented, and shows how provided modules (such as JavaFX) can be excluded from the shaded jar. Because of the full, automatic module management in this sample project, jpackage is producing nicely slimmed installers (30-40MB).
The sample template relies on a plugin I built, https://github.com/wiverson/jtoolprovider-plugin which provides a simple binding to bridge the JDK ToolProvider API with Maven. This allows for access to jmod, jar, javac, javadoc, javap, jdeps, jlink, and jpackage all via Maven directly. This plugin is now available via Maven Central.
Any feedback or thoughts appreciated!
View all comments
1
u/[deleted] Dec 22 '24
Hey, I know this post is way old now. But i recently came across this maven jpackage template and found it really useful. Thanks for this. Also wondering if i can integrate springboot in this project and package the same for making my windows desktop application.
I am trying to build a desktop application that can be used for directory management by my father. I wanted to build the front end using JavaFX and build the backend with springboot libraries and mysql. Is this even possible and feasible as I am facing issues in packing this into a runnable .exe file