Issue Details (XML | Word | Printable)

Key: MPJNLP-8
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Emmanuel Venisse
Reporter: Pelle Braendgaard
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Maven 1.x JNLP Plugin

Add Support for JarDiff

Created: 20/May/04 02:00 PM   Updated: 25/Apr/06 07:43 AM
Component/s: None
Affects Version/s: 1.3
Fix Version/s: 1.4

Time Tracking:
Not Specified

File Attachments: 1. File jnlpjardiff.diff (3 kB)
2. Java Archive File maven-jnlp-plugin-1.3-jardiff.jar (9 kB)

Issue Links:
Related
 


 Description  « Hide
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.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Pelle Braendgaard added a comment - 20/May/04 02:06 PM
This is a diff of my changes to jnlp adding support for jardiff and also for specifying the storetype in the jar signing process.

Emmanuel Venisse added a comment - 28/May/04 05:54 AM
Applied. Thanks.