|
The Update Center is a web service where the SNAP application can get new or updated modules from. Its URL can be added to the Update Center client within the application. The client supports multiple centres. This way users can get new modules from multiple providers. They can even create their own Update Center for their own organization.
# | Title | User Story | Importance | Notes |
---|---|---|---|---|
1 | Pluggable Toolboxes | Users shall be able to install, update and deinstall individual toolboxes: s1tbx, s2tbx, s3tbx from an NB update center | Must have | Additional considerations or noteworthy references (links, issues) |
2 | Update notification | SNAP shall notify users if module updates are available. | Must have | Additional considerations or noteworthy references (links, issues) |
Include any mockups, diagrams or visual designs relating to these requirements.
Below is a list of questions to be addressed as a result of this requirements document:
Question | Outcome | |
---|---|---|
If there are already modules on the Update Center, how can I merge/update the update.xml file automatically? | Communicate the decision reached | |
NetBeans modules can be signed for security reasons and to identify the author. How to do this? | The signing of NBMs follows the JDK Jar signing. The nbm-maven-plugin supports this with the nbm goal. This wiki page describes how to do it. The Keytool for generating the keystore is explained in more detail here. | |
How to notify users about a new release? | A notification element can be added to the
It is not possible to add this via the maven-netbeans-plugin. You need to add this manually to the file. If you do so, remember to update also the
|
Resources:
The nbm-maven-plugin provides the goal autoupdate. This goals assembles all NetBeans modules into a directory called netbeans_site in the output directory (./target by default) of the project. Additionally the updates.xml file is generated. This file is needed by the Update Center because it holds all necessary information about the modules which are provided by the server.
It seems that the most practical way to deal with the toolboxes and the Updated Center is to have for each toolbox and for the SNAP Engine one Update Center. Each project creates by calling the maven goal org.codehaus.mojo:nbm-maven-plugin:autoupdate its own set of nbm files and also the necessary updates.xml file.
This would lead to a server structure like the following:
www.senbox.org/updatecenter/
s1tbx/updates.xml
s1tbx/*.nbm
s2tbx/updates.xml
s2tbx/*.nbm
s3tbx/updates.xml
s3tbx/*.nbm
snap-engine/updates.xml
snap-engine/*.nbm
snap-desktop/updates.xml
snap-desktop/*.nbm
When installing new plugins the update manager complains if the plugin file is not signed and can not be validated. To sign plugins by the maven-netbeans-plugin the three properties specifying a keystore must be given.
<keystore>keystoreFile</keystore>
<keystorealias>aliasName</keystorealias>
<keystorepassword>password</keystorepassword>
The keystore can be created by using the keytool provided along with the JDK. Signing can be done by following the description in the link mentioned in the Question section.
>keytool.exe -genkey -storepass snap-123 -alias snap -validity
500 -keystore C:\keystore\snap.ks
Afterwards you are asked to provide some additional information like your name and name of your organisation and some regional information.
First and last name: ESA SNAP
Organisation unit: SNAP
Organisation: ESA
City:
Country:
Country code:
password: <ENTER>
At the end you are asked for a password for the generated key. Just hit ENTER and use the same as for the keystore. This is required.
In order to validate the signed plugins it is necessary to implement your own KeyStoreProvider.
For our update center repositories we need to generate the catalog xml files manually. The output of the maven goal nbm-maven-plugin:autoupdate can not be used directly. This goal just generates the catalog for a single maven project but we want to combine multiple maven project in one update center repository.Therefore a tool has been written which gathers all nbm files in a directory and generates the catalog for it. The tool class which implements it is com.bc.ceres.util.GenAUCatalog.
The tool takes up to three parameters:
The resulting update.xml/update.xml.gz can be uploaded to the update center repository along with the nbm files.