Awesome
jtoolprovider-plugin
This Maven Plugin does two things. First, it automatically transforms your Maven dependency graph into Java modules. Second, it bridges Maven and built-in Java tools like jdeps, jlink, and jpackage.
Why would you care about any of that? The main reason: this plugin makes it much, much easier to generate native Java desktop applications with nice, small installers. Here's a complete working example of generating a JavaFX desktop app, including GitHub Actions to automatically generate the macOS, Windows, and Linux versions.
The two goals for this plugin are collect-modules
(which processes the Maven dependency tree
to transform Maven dependencies into modules) and java-tool
(to run any supported JDK tool
directly from in Maven).
By combining this plugin with Maven build profiles, it's possible to build a single Maven pom.xml that can generate platform-specific installers. Very useful for things like working with JavaFX.
Next Steps
- Read the collect-modules goal documentation
- Read the java-tool goal documentation
- Check out the complete working example this plugin in action building a JavaFX desktop application, with GitHub Actions to generate the macOS, Windows, and Linux versions
Background Information
- The java-tool goal integrates with Maven via the Java ToolProvider API