How to create Update Center
This document contains brief steps how the staging update center can be created.
The intention is just provide basic instructions not the complete description of
update center problematic.
It is supposed that the reader has good knowledge of XML and DTD technologies.
What is Update Center
Update Center is a .xml file passing the NetBeans autoupdate-catalog{version}.dtd.
It contains at least module categories with links to modules and .
The .dtd files are available in NetBeans cvs in module: autoupdate/libsrc/org/netbeans/updater/resources.
You can see the latest version on the following address:
http://www.netbeans.org/dtds/autoupdate-catalog-2_3.dtd.
Simple Update Center catalog
The sample catalog may look like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE autoupdate_catalog PUBLIC "-//NetBeans//DTD Autoupdate Catalog 2.0//EN"
"autoupdate-catalog-2_0.dtd">
<module_updates timestamp="53/59/15/07/04/2004">
<!--Modules needed NOT to be restarted-->
<module distribution="my_module.nbm" downloadsize="10" needsrestart="false" license="my-license.txt" codenamebase="org.netbeans.modules.my_module/1" release="auto">
<manifest OpenIDE-Module-Specification-Version="2.1" OpenIDE-Module-Implementation-Version="200208191132" OpenIDE-Module-IDE-Dependencies="IDE/1 > 3.17" OpenIDE-Module-Name="my_module" OpenIDE-Module="org.netbeans.my_module"/>
</module>
<license name="my-license.txt"><![CDATA[License
Here
]]></license>
</module_updates>
You need to pay attention to following:
- write distribution attribute with the relative path (relatively to the catalog.xml)
- downloadsize parameter must be the same as real size of .nbm (in Bytes)
- versions related attributes must match to those of NetBeans IDE
Add update center to NetBeans
Let's assume we have created staging_catalog.xml located together with my_module.nbm in local directory /space/update_center.
We will make it working in NetBeans now:
- Open Tools|Options dialog.
- Select node IDE Configuration|System|Autoupdate Types
- Invoke popup menu and select item New|General Update Center
- Type some name e.g. "StagingUC" and Finish the wizard
- Select StagingUC node now and change Server URL option to "file:/space/update_center/staging_catalog.xml"
Now the StagingUC is available in Update Center Wizard and you can use it to update modules contained in the update center.