Maven and WebStart (jnlp)

If you plan to deploy your maven application via webstart you are a lucky man, because this is easy if you know how to do it 😉

I tried it without success, but then Geoffrey with his networktools came to my rescue. Now TimeFinder is jnlp-enabled. The following steps were necessary:

  1. create a new folder ‘jnlp’ under src/ (where main and test live)
  2. put the file template.vm there with:
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0+" codebase="" href="$outputFile">
        <vendor>TimeFinder Team</vendor>
        <homepage href=""/>
        <description kind="one-line">TimeFinder</description>
        <description kind="short">TimeFinder - the automatic timetabling generator for universities and schools</description>
        <description kind="tooltip">TimeFinder - the automatic timetabling generator for universities and schools</description>
        <icon href="" kind="default"/>
        <shortcut online="false"><desktop/><menu submenu="TimeFiner"/></shortcut>
        <j2se version="1.6+" initial-heap-size="32m" max-heap-size="128m" />
        <property name="jnlp.versionEnabled" value="true"/>
     <application-desc main-class="$mainClass">
  3. create a keystore:
    keytool -genkey -alias timefinder -keystore timefinder.jks
    be sure that you use keytool from the same JDK-PATH as you use for maven!
  4. add the following to your pom.xml:
             <!-- do not bind to install phase
  5. Now you should be able to execute:
    mvn install webstart:jnlp
    which will create a zip file with all the signed jars
  6. See my next post for versioning and pack200!

9 thoughts on “Maven and WebStart (jnlp)

  1. mvn install webstart:jnlp — gave me a horrible error, simply running it again made it work!

  2. Pingback: Further with Maven and WebStart (jnlp) « Java and more …

  3. Is there some reason you used the older 1.0-alpha-1 version rather than the newer 1.0-alpha-2 version of the plugin?

  4. And from which repository I can get this version? I cannot find it … although the website indicates that 1.0-alpha-2 should be available since 2007 !?

Comments are closed.