Overview of the main usages
Choices
There are many ways to use the webstart plugin and several mojos available to support your needs.
Deciding on which approach to use depends on your build & 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 you 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 ?
FIXME
The mojos
Jnlp Download Servlet mojo vs the others
The Jnlp Download Servlet mojo is similar to the 3 other JNLP mojos, but has a slighly different configuration file format.
Main differences with the other mojos
Goals Overview
General Information about the goals.
- webstart:jnlp, webstart:jnlp-inline and webstart:jnlp-single all help package a JNLP application as a ZIP file (useful for standalone static deployments or to further bundle them in war files). Pick the right mojo depending on your use case: multi-module, command line, etc... (FIXME add a note on how to choose between each other).
- webstart:jnlp-download-servlet helps to package a JNLP application to be deployed by Sun's JnlpDownloadServlet
- webstart:unsign unsign a jar. This mojo is primarily used internally by the jnlp mojos described above. This mojo will probably move to the maven-jar-plugin in the future, as did the sign jar functionality.
- webstart:report Creates a JNLP site report.
How to build a jnlp ZIP bundle
one typically attaches the jnlp-inline mojo to the package phase and execute:
sometimes one wants to prepare the bundle from the command line, so one reuses the mojo directly on the command line.
finally one may need to add the current module as a dependency to the webstart bundle
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 to a phase prior to the package one. Then do: