This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 160613 - Java Webstart application are not version-aware
Summary: Java Webstart application are not version-aware
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: rmichalsky
URL:
Keywords: REGRESSION, TEST
Depends on:
Blocks:
 
Reported: 2009-03-19 09:43 UTC by jisl
Modified: 2009-05-01 08:14 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Patch for version-aware jnlp generation (8.50 KB, text/plain)
2009-03-19 15:13 UTC, jisl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jisl 2009-03-19 09:43:55 UTC
Java Webstart application, created using MakeJNLP task from org.netbeans.nbbuild are not version-aware. That can cause
problems with large webstart application. In the current state, when the webstart app is updated and is not
version-aware, whole package must be downloaded. If we have version-aware webstart application (and we have
version-download protocol - see
http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/downloadservletguide.html#examples ), only updated
packages are downloaded.

After studying specification of the JNLP file and information about version-download protocol, the required changes are:

1) let MakeJNLP task create JNLP file with added "version" and "size" attributes for each "jar" and "nativelib" tag.
Versions of jars are specified in manifest.mf file in properties OpenIDE-Module-Implementation-Version or
Implementation-Version. If version is not found, we should specify explicitly versions for jars without version in
manifest.mf

2) Create version.xml file for each directory containing any jar
(http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/downloadservletguide.html#resources). Jar versions are
known from previous step.

Step 1 can be simply solved by adding "version" and "size" attributes to the "jar" tags. I can send you this patch.

But I'm not sure, if the step 2 should be part of the MakeJNLP task or should be another task (something like
MakeVersionXML task) or should be solved from outside. From "outside" I mean, that now the MakeJNLP task is called from
Maven Netbeans Module Plugin (http://mojo.codehaus.org/nbm-maven-plugin/) for creating westart application and if we
will be able to create version-aware JNLP files, we can create version.xml file from this plugin. But I'm not sure, if
this is the right solution.
Comment 1 Milos Kleint 2009-03-19 09:45:20 UTC
reassigning to apisupport
Comment 2 Milos Kleint 2009-03-19 09:58:36 UTC
btw since the task is used by the maven nbm plugin, it would be nice to have it in 6.7, so that it can be reused by the
maven tooling.
Comment 3 Jesse Glick 2009-03-19 14:20:11 UTC
#1 should be easy (in fact I am surprised we did not do it already), #2 perhaps harder but does not look too bad.

We have never attempted to provide incremental download for NB JNLP apps. Would be useful. Pack200 support may already
be filed separately.

OpenIDE-Module-Specification-Version is what should map to the JNLP version, BTW. OIDE-M-I-V is not even necessarily a
number. When you want to push a new version of module to an NB update center, you bump up the spec vers; JNLP pushes
should work the same way.
Comment 4 jisl 2009-03-19 15:13:17 UTC
Created attachment 78460 [details]
Patch for version-aware jnlp generation
Comment 5 rmichalsky 2009-04-27 09:08:30 UTC
core-main #61e2e4f1bd7f

OpenIDE-Module-Specification-Version and Specification-Version are used instead of OIDE-M-I-V and I-V and I've added
support for Ant-based apisupport modules as well (switched on by jnlp.generate.versions=true).
Comment 6 Jesse Glick 2009-04-28 00:49:22 UTC
Caused several failures in build-jnlp which need to be investigated and resolved:

http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/2952/testReport/

BTW stylistic notes about patch:

- indentation is inconsistent

- use Map/Set, not HashMap/HashSet, as declared type of fields and parameters
Comment 7 Quality Engineering 2009-04-28 18:55:19 UTC
Integrated into 'main-golden', will be available in build *200904281401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/61e2e4f1bd7f
User: Richard Michalsky <rmichalsky@netbeans.org>
Log: #160613: JNLP versioning info generation
Comment 8 Jaroslav Tulach 2009-04-29 11:25:58 UTC
This change also caused regression in nbbuild tests. Following cases are failing:
org.netbeans.nbbuild.MakeJNLPTest.testTheLocalizedAutoupdateProblem  
org.netbeans.nbbuild.MakeJNLPTest.testGenerateJNLPForMissingRegularModule
org.netbeans.nbbuild.MakeJNLPTest.testGenerateJNLPAndSignedJarForSimpleLocalizedModule
org.netbeans.nbbuild.MakeJNLPTest.testGenerateJNLPForMissingCoreIssue103301
org.netbeans.nbbuild.MakeJNLPTest.testGenerateJNLPAndUnSignedJarForSimpleLocalizedModule
org.netbeans.nbbuild.MakeJNLPTest.testGenerateJNLPAndSignedJarForModuleWithClassPathAndSignedJar
Comment 9 rmichalsky 2009-04-30 12:35:12 UTC
core-main #e128d9dbc48b
Comment 10 Quality Engineering 2009-05-01 08:14:04 UTC
Integrated into 'main-golden', will be available in build *200905010201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/e128d9dbc48b
User: Richard Michalsky <rmichalsky@netbeans.org>
Log: #160613: fixing regressions, tests pass now