This page last changed on Oct 23, 2008 by scytacki.

Setup JNLP Deployment Environment and Using the Maven Webstart Jnlp Plugin

Child pages sorted with the most recently updated first:

Solutions to common problems

Dependency Problems

  1. the jnlp plugin (and all maven plugins as far as I can tell) doesn't handle it well when you have build and installed or deployed a local snapshot project. If your jnlp depends on this project it will pickup the -SNAPSHOT version instead of the -2007... timestamp version. So the trick is to have the jnlp plugin use a different local repository when it is run. This can be done by making a new settings.xml file which has a localRepository element. This should point to somewhere other than the default (~/.m2/repository). This new settings.xml file is specified using the -s option to mvn. More about the way -SNAPSHOT versions are handled by maven: Repository-SNAPSHOT Handling

Jar Format Problems

Jar doesn't pack correctly.
  1. The ibm icu4j jar does not pack correctly, so after the first run of maven jnlp goal, you should delete the .pack file and manually sign the jar with jarsigner.
Jar has been previously signed
  1. The javahelp jar has some stuff in its manifest which keeps jarsigner from verifying it correctly.
    It reports:
    jarsigner: java.lang.SecurityException: invalid SHA1 signature file digest for com/sun/java/help/impl/ViewAwareComponent.class

    Edit the java help jar (in the jnlp working directory) and remove the two sun signature files. They both have the same base name and one of them ends with sha1.

  2. the myswing.jar had a similar problem. In that case the jar is retrieved from our maven repo so the old signature was removed.
meta-inf and META-INF folders
  1. the gnujaxp.jar file used by CCK had two types of meta-inf folders one upper case and one lower case. This screws up the pack200 code somehow. Here is the error it was causing:
    Caused by: org.apache.maven.plugin.MojoExecutionException: Failure to run the plugin:
            at org.codehaus.mojo.webstart.JnlpMojo.execute(
            at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
            ... 16 more
    Caused by: java.lang.RuntimeException: Error Unpacking: /home/scott/EclipseWorkspaces/Current/MavenJnlp/all-otrunk-snapshot/target/jnlp/org/concord/external/cck/gnujaxp/gnujaxp__V1.0.jar.pack
            at org.codehaus.mojo.webstart.Pack200.unpackJars(
            at org.codehaus.mojo.webstart.JnlpMojo.execute(
            ... 18 more
    Caused by: Error in unpack200
            at org.codehaus.mojo.webstart.Pack200.unpackJars(
            ... 19 more
    Caused by: duplicate entry: META-INF/
            at java.util.jar.JarOutputStream.putNextEntry(
            ... 21 more
Document generated by Confluence on Jan 27, 2014 16:52