Maven projects¶
For Maven there's no plugin. Instead, Conveyor will discover the JARs in your project by running the output of the mvn
command and using it directly as configuration. Other aspects like project name must be specified explicitly. Better import from Maven is planned in a future release.
Maven on Windows
Currently, automatic import from Maven only works on UNIX. On Windows you'll need to follow the instructions below for "other build systems".
Here's an example of how to package a Maven project:
conveyor.conf | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
- You can import JDKs by major version, major/minor version, and by naming a specific distribution.
- This included file contains a single line, which runs Maven, tells it to print out the classpath and assigns the result to the
app.inputs
key:include "#!=app.inputs[] mvn -q dependency:build-classpath -Dmdep.outputFile=/dev/stdout -Dmdep.pathSeparator=${line.separator}"
. In future this file will be updated to trigger a higher quality Maven import. - The
fsname
is what's used for names on Linux e.g. in thebin
directory, for directories underlib
. In fact when specified the vendor is also used, and the program will be calledglobal-megacorp-my-program
unless thelong-fsname
key is overridden. - You may not need to set this if the display name of your project is trivially derivable from the fsname. The default here would be
My Program
. - This is optional. It'll be prefixed to the display name and used as a directory name in various places; skip it if you don't work for an organization.
- This is where the created packages will look for update metadata.
Adapting a JavaFX app¶
The idea is straightforward - get all the JARs your app needs into a single directory. Below is a config that packages the gallery demo for the modern AtlantaFX skin. Here's the commit that added the packaging. The Maven POM in this project collects all the app JARs into the sampler/target/dependencies
directory when the commands at the top of the file are run by hand. Conveyor can then just pick them up and package them.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
|
There are several tasks accomplished by this config:
- Import a JDK of the right version from your preferred vendor.
- Import the JavaFX JMODs so the JVM will have it linked in.
- Add the client enhancements config (this line is optional).
- Set the names, versions and get a free license by pointing to the GitHub URL.
- Supply Conveyor with the directory where the app JARs can be found.
- Import icons for macOS and Windows. Icons must be PNG files. You don't have to supply all the sizes.
- Define the main class and the JDK modules (including the javafx modules) that you want to use.
- Define the URL where the packages will look for online updates.
Please see the Gradle page to see how to set your stage icons.