Consider an NBM with the external content ("<foo>.external"). When the update center is downloading this NBM, the progress bar is stuck until the external file is downloaded (on 99%/100% in some cases). Given the external content is typically bigger than the NBM itself, this may take considerable amount of time and the stuck progress bar may (and is) causing confusion. I propose to:
-optionally augment the .external files with the size of the file-to-be-downloaded
-make sure the downloadsize attribute in the AUC catalog is the sum of the actual NBM size and the declared sizes of all the external content in the NBM
-fix the download progress Plugins dialog to also show the progress in downloading the external content
I will attach a patch that tries to do that.
Created attachment 119073 [details]
Please review, thanks.
The patch looks good.
JR01: Increase Specification-Version to 1.32 (1.31 already in core-main repo)
JR02: Will be value of element SIZE generated during build clusters?
JR02: the "downloadsize" attribute in the module element in the AUC catalog is computed automatically, but the SIZE entry in the .external file needs to be filled manually by the developer, similarly to the CRC entry (I at least do not know about any automated way to generate the CRC entry into the .external file). We could create a tool that would generate these entries from a given jar, maybe even generate the m2 URL, but I don't see big need to that right now.
(In reply to comment #4)
> We could create a tool that would generate these entries from a given
> jar, maybe even generate the m2 URL
In fact when you build an NBM wrapping Central JARs using the dev version of nbm-maven-plugin, creation of *.external incl. CRC and 'http' and 'm2' URLs is done automatically. I have no plans to copy such a feature into apisupport.harness, since it would be far harder to implement URL calculation in an Ant task for logistical reasons.
The Ant-based <makenbm> _could_ easily update a source *.external (containing just URLs) with CRC and SIZE provided that the input cluster also contained the raw JAR, which it typically would (since otherwise you could not run the module in place).
I will also update nbm-maven-plugin to add SIZE when generating *.external, and to quietly ignore it when unpacking an NBM (normally it warns about unrecognized lines).
Integrated into 'main-golden', will be available in build *201205150400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Jan Lahoda <firstname.lastname@example.org>
Log: #212068: include the size(s) of external NBM content in the NBM download size, and show progress while downloading the external content
Integrated into 'main-golden', will be available in build *201205160400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Jesse Glick <email@example.com>
Log: #212068 fix broke NbmExternalTest.