Message:

   The following issue has been closed.

   Resolver: Emmanuel Venisse
       Date: Fri, 28 May 2004 5:54 AM

Applied. Thanks.
---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/browse/MPJNLP-8

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MPJNLP-8
    Summary: Add Support for JarDiff
       Type: New Feature

     Status: Closed
   Priority: Major
 Resolution: FIXED

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: maven-jnlp-plugin
   Fix Fors:
             1.4
   Versions:
             1.3

   Assignee: Emmanuel Venisse
   Reporter: Pelle Braendgaard

    Created: Thu, 20 May 2004 2:00 PM
    Updated: Fri, 28 May 2004 5:54 AM

Description:
Sun's JNLP Download Servlet has a neat feature for doing jar diffs, where they only 
give you the differences between various versions of a jar file. This can improve the 
download speeds immensely between updates.

The current of the jnlp plugin supports the versions.xml file which is used by the 
download servlet to map the jar files to specific version numbers.

However it is currently handled indirectly. Currently the jnlp file has the following 
for a dependency:

<jar version="1.4" href="dom4j-1.4.jar">
</jar>

which is incorrect. It should have the following:

<jar version="1.4" href="dom4j.jar">
    </jar>

which allows the download servlet to find the jar file using the version.xml file.

The version.xml file also is incorrect (all be it it works with the above incorrect 
jnlp). Currently it generates the following:

<resource>
    <pattern>
      <name>dom4j-1.4.jar</name>
      <version-id>1.4</version-id>
    </pattern>
    <file>dom4j-1.4.jar</file>
  </resource>

What it should generate is the following:

<resource>
    <pattern>
      <name>dom4j.jar</name>
      <version-id>1.4</version-id>
    </pattern>
    <file>dom4j-1.4.jar</file>
  </resource>

This now leads us to the problem with autogenerating a version.xml file. This file 
needs to contain all the previous versions of each dependency. This could get very 
complex.

Thankfully there is a way around this. It is to use a naming based versioning scheme. 
Sun in their wisdom decided to invent a new one. However it is fairly easy to modify 
the current jnlp plugin to support it.

What happens is that we need to rename dom4-1.4.jar to dom4__V1.4.jar. Now when we 
deploy our updated app we just leave the old jar files where they are and the JNLP 
Download Servlet can calculate diffs based on it.

I've included diffs for doing it. All you need to do is place the following property 
in your project.properties:

        maven.jnlp.jardiff=true

I will attach the diff file in the comments to this entry.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to