Property | Optional? | Description | Default |
---|---|---|---|
maven.jnlp.dir | Yes | Root of generated .jnlp file and signing jars. | ${maven.build.dir}/jnlp |
maven.jnlp.spec | Yes | The versions of the specification that this JNLP file required. | 1.0+ |
maven.jnlp.http.codebase | Yes | The jnlp root element on web server. | ${pom.url} |
maven.jnlp.title | Yes | The name of the application. | ${pom.name} |
maven.jnlp.vendor | Yes | The name of the vendor of the application. | ${pom.organization.name} |
maven.jnlp.homepage | Yes | URL locating the home page for the application. It can be used by the JNLP Client to point the user to a Web page where they can find more information about the application. | index.html |
maven.jnlp.icon | Yes | URL locating the icon of the application. The icon can be used by a JNLP Client to identify the application to the user. | |
maven.jnlp.icon.splash | Yes | URL locating the splash screen icon of the application . The icon can be used by a JNLP Client to customise a splash screen to the user. | |
maven.jnlp.description | Yes | The default description of the application. All descriptions contains plain text. No formatting, such as, e.g., HTML tags are supported. | ${pom.description} |
maven.jnlp.description.one-line | Yes | If a reference to the application is going to appear in one row in a list or a table, this description will be used. | |
maven.jnlp.description.short | Yes | The short description of the application. If a reference to the application is going to be displayed in a situation where there is room for a paragraph, this description is used. | ${pom.shortDescription} |
maven.jnlp.description.tooltip | Yes | A description of the application intended to be used as a tooltip. | |
maven.jnlp.offline.allowed | Yes | The optional offline-allowed element indicates if the application can work while the client system is disconnected from the network. The default is that an application only works if the client system is online. | false |
maven.jnlp.permission | Yes | Possible values : all or j2ee. The specification specifies two trusted environments, the all-permissions environment and an environment that meets the security specifications of the J2EE Application Client environment. Both of these environments provide unrestricted access to the network and local disk. Thus, an application can intentionally or unintentionally harm the local system. An application must only be launched if it is trusted. | |
maven.jnlp.j2se.version | Yes | Describes supported version of the JRE. | 1.4 |
maven.jnlp.j2se.heapsize.initial | Yes | Indicates the initial size of the Java heap. The modifiers m and k can be used for megabytes and kilobytes, respectively. For example, "128m" will be the same as specifying "134217728" (128*1024*1024). The modifiers are not case-sensitive. | 32m |
maven.jnlp.j2se.heapsize.max | Yes | Indicates the maximum size of the Java heap. The modifiers m and k can be used for megabytes and kilobytes, respectively. For example, "128m" will be the same as specifying "134217728" (128*1024*1024). The modifiers are not case-sensitive. | 128m |
maven.jnlp.properties | Yes | The arguments passed to the jvm. The arguments are seperated by a space. The argument itself is in the format name=value. This mechanism doesn't allow for spaces in any of the arguments itself. | |
maven.jnlp.isapplet | Yes | Defines if JNLP file describes an applet. | false |
maven.jnlp.applet.name | Yes | The applet name. | |
maven.jnlp.isinstaller | Yes | Defines if JNLP file describes an installer. | false |
maven.jnlp.iscomponent | Yes | Defines if JNLP file describes a component. | false |
maven.jnlp.mainclass | Yes | The main class for the application or the applet. If this is not specified, then the Main-Class manifest entry for the main JAR file is used. If neither is specified, then the launch must be aborted. | |
maven.jnlp.mainclass.arguments | Yes | The argument list for the main class. All arguments are separated by a space. | |
maven.jnlp.usejarversions | Yes | Generate jar references in jnlp file with their associated version numbers. Generate a version.xml file to map these version numbers to the actual jar files. | false |
maven.jnlp.cert.version | Yes | A version string to be appended to each dependency version when generating version.xml. (This is only useful if maven.jnlp.usejarversions is set to true). This comes in handy, when your code signing certificate expires and is renewed. Java Web Start requires that ALL jars be signed with the same certificate. When renewing a certificate you must change all of the version numbers of all jars, so that the JWS client will re-download the jars that haven't changed, but have only been re-signed by the new key. With this property, when you get a renewed key, all you have to do, is update the maven.jnlp.cert.version string to a new value, and the new version.xml will have all new version strings for ALL jars. | false |
maven.jnlp.jardiff | Yes | Use the jar diff option for the Sun's JNLP Download Servlet. | false |
Property | Optional? | Description | Default |
---|---|---|---|
maven.jnlp.signjar.store | Yes | The keystore location. It's necessary if you want sign your jars. | |
maven.jnlp.signjar.storepass | Yes | The password for keystore integrity. Must be at least 6 characters long. | |
maven.jnlp.signjar.storetype | Yes | The keystore type. | jks |
maven.jnlp.signjar.alias | Yes | The alias for the keystore. | ${pom.artifactId} |
maven.jnlp.signjar.validity | Yes | Indicates how many days certificate is valid. | 720 |
maven.jnlp.signjar.dname.cn | Yes | The common name of distinguished name. | |
maven.jnlp.signjar.dname.ou | Yes | The organization unit of distinguished name. | |
maven.jnlp.signjar.dname.o | Yes | The organization of distinguished name. | ${pom.organization.name} |
maven.jnlp.signjar.dname.l | Yes | The locality of distinguished name. | |
maven.jnlp.signjar.dname.s | Yes | The street of distinguished name. | |
maven.jnlp.signjar.dname.c | Yes | The country of distinguished name. |
You must tell Maven what jars you want included in the jnlp distribution. This is achieved by specifying meta-information in the POM, using the following syntax for jar files :
<dependency> <id>jarid</id> <version>jarversion</version> <properties> <jnlp.jar>true</jnlp.jar> </properties> </dependency>
Or for native jar files :
<dependency> <id>jarid</id> <version>jarversion</version> <properties> <jnlp.native.jar>true</jnlp.native.jar> </properties> </dependency>
Or for using JNLP extension mechanism :
<dependency> <id>jarid</id> <version>jarversion</version> <properties> <jnlp.extension.site>hostname</jnlp.extension.site> <jnlp.extension.dir>directory</jnlp.extension.dir> <jnlp.extension.jnlp>jnlp-filename</jnlp.extension.jnlp> </properties> </dependency>
The JNLP extension mechanism is useful e.g. as a workaround when JAR files signed by different certificates are used, see Java Webstart FAQ, How do I use JAR files that are signed by different certificates?).
When using JNLP extension feature, jnlp.extension.site must not contain URL prefix - "http://" is the only protocol supported now. Property jnlp.extension.site is a optional, if omited a relative URL is constructed from jnlp.extension.dir and jnlp.extension.jnlp. If JNLP file is stored in the same directory as the generated JNLP file and one likes to avoid absolute pathnames, one should use "." as value for jnlp.extension.dir.
When you define the main class of your application, you must define the jar that contains the main class. This is achieved by specifying meta-information in the pom, using the following syntax for jar files :
<dependency> <id>jarid</id> <version>jarversion</version> <properties> <jnlp.jar>true</jnlp.jar> <jnlp.main.jar>true</jnlp.main.jar> </properties> </dependency>
If no jars contains this tag (jnlp.main.jar), it's the project jar which will be used.