public class WebMojo extends AbstractJfxToolsMojo
Generates web deployment bundles (applet and webstart). This Mojo simply wraps the JavaFX packaging tools so it has all the problems and limitations of those tools. Currently you get both the webstart and applet outputs whether you want both or not.
This Mojo will automatically try and sign all JARs included in the deployment bundle if 'all-permissions' are requested. If permissions are not requested, no signing will take place. The keystore parameters of this Mojo are only used in the case where signing is needed, and in that case some are required.
As a general comment, these web deployment techniques have been pretty error prone in the newer releases of Java. They are also not ideal if the user doesn't have Java already installed as the JRE installation process is very user unfriendly. Additionally, these web deployment methods are the root of all the security problems that have been giving Java a bad name recently. For all these reasons and more, I'd highly recommend moving away from these deployment approaches in favour of native deployment bundles or just plain old JARs.
For detailed information on generating web bundles it is best to first read through the official documentation on the JavaFX packaging tools.
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
allPermissions
Set this to true if your app needs to break out of the standard web sandbox and do more powerful functions.
|
protected String |
embeddedHeight |
protected String |
embeddedWidth |
protected int |
height |
protected String |
keyPassword
The password to use when accessing the key within the keystore.
|
protected File |
keyStore
The location of the keystore.
|
protected String |
keyStoreAlias
The alias to use when accessing the keystore.
|
protected String |
keyStorePassword
The password to use when accessing the keystore.
|
protected String |
keyStoreType
The type of KeyStore being used.
|
protected boolean |
needMenu
Set this to true if you would like your application to have a link in the main system menu (or platform
equivalent) when it is installed.
|
protected boolean |
needShortcut
Set this to true if you would like your application to have a shortcut on the users desktop (or platform
equivalent) when it is installed.
|
protected String |
preLoader
A custom class that can act as a Pre-Loader for your app.
|
protected String |
vendor
The vendor (i.e.
|
protected File |
webOutputDir
The output directory that the web bundle is to be built into.
|
protected int |
width |
deployDir, jfxAppOutputDir, jfxMainAppJarName, mainClass, project, verbose| Constructor and Description |
|---|
WebMojo() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
getPackagerLibprotected String vendor
protected File webOutputDir
The output directory that the web bundle is to be built into. Both the webstart and applet bundle are generated into the same output directory and share the same JNLP and JAR files.
protected boolean needShortcut
protected boolean needMenu
protected String preLoader
protected boolean allPermissions
Set this to true if your app needs to break out of the standard web sandbox and do more powerful functions.
By setting this value, you are implicitly saying that your app needs to be signed. As such, this Mojo will automatically attempt to sign your JARs if this is set, and in this case the various keyStore parameters need to be set correctly and a keyStore must be present. Use the generate-key-store Mojo to generate a local keyStore for testing.
If you are using FXML you will need to set this value to true.
protected int width
protected int height
protected String embeddedWidth
protected String embeddedHeight
protected File keyStore
protected String keyStoreAlias
protected String keyStorePassword
protected String keyPassword
protected String keyStoreType
Copyright © 2012-2013. All Rights Reserved.