Fork me on GitHub

Usage

Overview of the main usages.

Choices

There are many ways to use the Webstart Maven Plugin and several goals are available to support your needs.

Deciding on which approach to use depends on your build and deployment needs. Here are some questions that will help you decide which approach suits you best.

  • Is your build fully automated or do you want to perform some operations on the command line?
  • Do you have a multi module build?
  • Do you deploy your JNLP file(s) within a WAR (created by Maven) or not?
  • Do you want to generate the final JNLP file(s) yourself or do you want to dynamically populate it on the server side? (Dynamicity can be achieved using Sun's Download Servlet but is not limited to it).
  • If you need to generate multiple JNLP file(s), are those sufficiently similar to be generated from a single Maven module?

See also FAQ.

The goals

jnlp-download-servlet vs the others

The jnlp-download-servlet goal is similar to the 3 other JNLP goals, but has a slightly different configuration file format.

Main differences with the other goals
  • The jnlp-download-servlet goal supports many applications at once (adding this feature to the other JNLP goals is planned: MWEBSTART-58)
  • The jnlp-download-servlet goal configuration format is slighly more complex but also more flexible when it comes to selection of dependencies to include in the applications.
  • The jnlp-download-servlet goal functionality is only available in one goal (There are 3 jnlp goals to cover various use cases, multi-module, command line, etc...)

Note: In the future, we will work to make the 2 configurations more similar to ease going from simple projects to those using jnlp-download-servlet.

Goals Overview

General Information about the goals.

How to build a JNLP ZIP bundle

One typically attaches the jnlp-inline goal to the package phase and execute:

mvn package

Sometimes one wants to prepare the bundle from the command line, so one reuses the goal directly on the command line.

mvn webstart:jnlp-inline

Finally one may need to add the current module as a dependency to the Webstart bundle and not install the resulting ZIP file in the local repository.

mvn install webstart:jnlp

How to build a JNLP ZIP bundle ready for Sun's Download Servlet

Package your module as WAR, add the appropriate dependency to Sun's Download Servlet (see JNLP 101), and attach the jnlp-download-servlet goal to a phase prior to the package phase. Then do:

mvn package