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.
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.
reassigning to apisupport
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.
#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.
Created attachment 78460 [details] Patch for version-aware jnlp generation
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).
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
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
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
core-main #e128d9dbc48b
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