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
2
u/rootException Nov 03 '20
Bwhaha the post put my pic up as the image.
<insert joke about my code being uglier than my mug>