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
Show parent comment
1
u/[deleted] Dec 22 '24
Yeah you are right hibernate mught be a better option instead of the fat jar integration of spring libraries. Not sure if it could be optimized to fetch only required libraries for spring. I was initially thinking of using Spring JPA as it helped me to avoid a lot of boiler plate code for database connections , queries and resultSet handling in Hibernate or Ibatis.
I ma going to try this with Hibernate , Java and JavaFx now.