This example showcases how to configure FXLauncher in your Maven application to provide automatic updates optionally in combination with native installers.
Please see pom.xml for complete documentation.
Note: There is nothing Maven spesific about FXLauncher, and these operations should be easy to perform in any build system. There is also a Gradle version of this project.
The following operations are supported by the example:
- Compile project jar to app.dir
- Copy dependencies to app.dir
- Generate app.xml manifest
- Create native installer
- Upload artifacts to auto update repository
Copy the deployment descriptor and customize the following properties:
<properties>
<!-- Application Name -->
<app.filename>${project.name}</app.filename>
<!-- The JavaFX Application class name -->
<app.mainClass>no.tornado.FxlDemo</app.mainClass>
<!-- The app and launcher will be assembled in this folder -->
<app.dir>${project.build.directory}/app</app.dir>
<!-- Native installers will be build in this folder -->
<app.installerdir>${project.build.directory}/installer</app.installerdir>
<!-- Base URL where you will host the application artifacts -->
<app.url>http://fxsamples.tornado.no/demo/</app.url>
<!-- Optional scp target for application artifacts hosted at the above url -->
<app.deploy.target>[email protected]:fxldemo</app.deploy.target>
</properties>
mvn clean package
mvn exec:exec@deploy-app
mvn install
See http://fxldemo.tornado.no for a prebuilt version of this application, including native installers for Windows, MacOSX and Linux.