Note: the idea is to package most of the doc in the code. This is just a place holder for things that have not been moved there yet. This page will gradually disappear.
See also the latest deployed doc
The code is stable today and used by different people in several projects. The plugin is not yet available from the snaphosts codehaus repository. The main reasons is that we plan to make some small incompatible changes to stabilize the interface. Once these changes will be done (in the coming days), the plugin will be updated and hopefully all information related to building the plugin will ne online.
See Subversion at the haus for subversion tips.
The code can be checked out doing:
svn co svn://svn.codehaus.org/mojo/scm/trunk/mojo/mojo-sandbox/webstart-maven-plugin |
mvn -N install |
Hopefully these 2 build issues will be solved soon by deploying a stable version of the plugin on the snapshots repository!
use user@mojo.codehaus.org. Feel free to copy me if I don't answer within 48h (jerome.lacoste@gmail.com)
We already have some ideas on where to go from there, and patches waiting to be committed. So it is recommended that you contact us before adding new features so that we don't duplicate work or go in different directions. It would be sad to see code and efforts wasted!
Ease deployment of webstart applications for m2.
Will incorporate m1 JNLP and Webstart plugins.
Requires input on proposed pom.xml specs. Feel free to pick up a* task. See also the* proposed proposal
Tell us your use cases:
http://maven.apache.org/plugins-sandbox/webstart/
Provides the following features:
[jnlp] Generate JNLP file and sign all jars generate-jnlp .................. Generate the .jnlp file and sign all jars generate-keystore .............. Generate a keystore file init ........................... Initialize jnlp plugin |
<maven:property name="maven.jnlp.signjar.alias" defaultValue="${pom.artifactId}"/>
<maven:property name="maven.jnlp.signjar.dname.o" defaultValue="${pom.organization.name}"/>
|
<configuration>
<!-- dependencies to sign (runtime-sub-dependencies get signed too). -->
<dependencies>
<dependency>commons-logging:commons:logging</dependency>
<dependency>commons-cli:commons:cli</dependency>
</dependencies>
|
- generate jnlp
- if maven.jnlp.usejarversions
generate version.xml (note something trickery with SNAPSHOT handling)
- copy jars in jnlp dir:
if store exists
copy jars && update manifest
sign jars
sign dependencies
else
copy dependencies jars (flatten)
|
http://ant-jnlp-war.sourceforge.net/
- copy files copy icons -> app/icon/ copy jnlp-servlet.jar -> WEB-INF/lib/ jars and main jar -> app/ native libs -> app/nativelib/ - pack200 && sign pack/unpack/sign for app/ and app/nativelib/ then pack again - gen jnlp file, web.xml, index.html download.html w/ velocity - create war Note: use ant tasks for pack/unpack/sign. Apparenlty use default settings of the pack200 operations |
See ant-jnlp-war/src/core/org/unintelligible/antjnlpwar/task/JnlpWar#execute
Before I forget, notify the ant-jnlp-war developer(s) or the issue they have in the following Velocity template (wrong element closing)
#if ( $task.application.mainclassargs )
<application-desc main-class="${task.application.mainclass}">
#foreach($arg in $task.application.mainclassargs)
<argument>$arg</argument>
#end
</application>
#else
<application-desc main-class="${task.application.mainclass}"/>
#end
|
/* * @(#)JnlpDownloadServlet.java 1.8 03/01/23 * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package jnlp.sample.servlet; ... |
not redistributable
Credit to Philipp Meier for retrieving it.
/*
* @(#)JnlpDownloadServlet.java 1.7 05/02/05
*
* Copyright (c) 2005 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* -Redistribution of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* -Redistribution in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* Neither the name of Sun Microsystems, Inc. or the names of contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MIDROSYSTEMS, INC. ("SUN")
* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
* You acknowledge that this software is not designed, licensed or intended
* for use in the design, construction, operation or maintenance of any
* nuclear facility.
*/
|
I.e. BSD License
+ nuclear clause ![]()
See internal doc
Reuse or made reusable several part of the implementation:
See internal doc
See internal doc
See internal doc
When working with a project ot type war (future implementation), we could also
/WEB-INF/web.xml /WEB-INF/lib/jnlp-servlet.jar /WEB-INF/lib/<jar files for XML parser> (not needed if the servlet container is running J2SE 1.4+) |
TS: 2002-04-23 19:21:05
<?xml version="1.0" encoding="UTF-8"?>
<jnlp codebase="$$codebase">
<information>
<title>Example 1</title>
<vendor>Myself</vendor>
<description>just an example</description>
<icon xhref="images/icon.gif"/>
</information>
<resources>
<j2se version="1.2+"/>
<jar xhref="application.jar"/>
</resources>
<application-desc/>
</jnlp>
|
TS: 2002-04-23 19:21:05
<?xml version="1.0" encoding="UTF-8"?>
<jnlp codebase="$$codebase" xhref="$$name">
<information>
<title>Example 2</title>
<vendor>Myself</vendor>
<description>just an example</description>
<icon xhref="images/icon.gif"/>
</information>
<resources>
<j2se version="1.2+"/>
<jar xhref="application.jar" version="1.1"/>
<jar xhref="lib.jar" version="2.1"/>
</resources>
<application-desc/>
</jnlp>
|
should we modify it automatically ? (to add jnlp-servlet reference)
Most of this was moved inside the internal doc
Specify below how the user should write his pom.xml to achieve his goals.
Order below doesn't reflect priority
See internal doc
The idea is to support producing a single ZIP with multiple webstart applications, signed using the same keys. Main goal is to allow speed up.
Fip layout:
app1.jnlp app2.jnlp jar1.jar jar2.jar jar3.jar images/ |
Signing info is unique for the multiple webapplications. Jars are signed/packed once.
I am thinking of modifying the JNLP config to something like:
<configuration>
<dependencies>
<!-- common dependencies -->
</dependencies>
<jnlps>
<jnlp>
<outputFile>app1.jnlp</outputFile>
<!-- as before -->
</jnlp>
<jnlp>
<outputFile>app2.jnlp</outputFile>
<dependencies>
<!-- app2 specific dependencies (added to common) -->
</dependencies>
<!-- as before -->
</jnlp>
</jnlp>
<sign> ... </sign> <!-- applies to all -->
</configuration>
|
I intend to extract the config into it's own file. Any objection?
NOT YET SUPPORTED
This will have to be done in 3 phases:
List of tasks to do. If you want to do something, write your name.
You can program it like that:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>keytool-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>genkey</goal>
</goals>
</execution>
</executions>
<configuration>
<keystore>keystore</keystore>
<dname>cn=www.example.com, ou=None, L=Seattle, ST=Washington, o=ExampleOrg, c=US</dname>
<keypass>m2m2m2</keypass>
<storepass>m2m2m2</storepass>
</configuration>
</plugin>
</plugins>
</build>
|
These are just the minimum parameters one must use. There are around 10 parameters available.
Comment from Philipp Meier: we have to make sure that specifying the passwords outside of the pom will work. This being the command line or properties file.
http://www.vamphq.com/sophie/ collection of apps, many related to JNLP
http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/pack200.html
See also MOJO-7
See also MOJO-82
See also MMN-1130
See also MNG-1251
See also MNG-1274
See also MNG-1310
See also MNG-1311
See also MNG-1462
See also MNG-1588
See also MAVENUPLOAD-559
See also MAVENUPLOAD-560
See alo https://sun-jnlp-servlet.dev.java.net/, where I will put the maven jnlp servlet jars, forked from Mustang.
http://docs.codehaus.org/display/MAVEN/Maven+Plugin+Matrix