Maven plugin for JavaFX
The JavaFX Maven Plugin provides a way to assemble distribution bundles for JavaFX applications (8+) from within Maven.
This plugin is essentially a Maven wrapper for the packaging tool that comes with JavaFX, it's called javapackager.
For easy configuration please use the old configurator: https://zenjava.net/javafx-maven-plugin/
Add this to your pom.xml within to your build-plugin:
<plugin>
<groupId>com.zenjava</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>8.8.3</version>
<configuration>
<mainClass>your.package.with.Launcher</mainClass>
</configuration>
</plugin>
To create your executable file with JavaFX-magic, call mvn jfx:jar
. The jar-file will be placed at target/jfx/app
.
Add this to your pom.xml within to your build-plugin:
<plugin>
<groupId>com.zenjava</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>8.8.3</version>
<configuration>
<vendor>YourCompany</vendor>
<mainClass>your.package.with.Launcher</mainClass>
</configuration>
</plugin>
To create your executable file with JavaFX-magic and some installers (please see official oracle-documentation which applications are required for this), call mvn jfx:native
. The native launchers or installers will be placed at target/jfx/native
.
SNAPSHOT
-versionsWhen you report a bug and this got worked around, you might be able to have access to some -SNAPSHOT-version, please adjust your pom.xml
:
<pluginRepositories>
<pluginRepository>
<id>oss-sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
Version 8.8.3 (09-feb-2017)
Bugfixes:
<launcherArguments>
of secondary launchers not being set correctly (reported at the javafx-gradle-plugin)upcoming Version 8.10.0 (???-???-2021)
New:
<skipKeypassWhileSigning>true</skipKeypassWhileSigning>
and <skipKeyStoreChecking>true</skipKeyStoreChecking>
, makes it possible to have hardware tokensgroupId
by setting <prefixWithGroupIdForClasspathDependencies>true</prefixWithGroupIdForClasspathDependencies>
, should work around the edge-case where dependencies have the same artifactId and would overwrite otherwiseEnhancement:
Documentation: