The following example is imaginary - it is not a real Nuxeo update package. It's purpose is to be an example of a complex package installable on a Nuxeo distribution.
In this example we will create a package to install Nuxeo Automation feature on a 5.3.2 version of Nuxeo DM.
What we want to install
Nuxeo Automation is composed of 3 Nuxeo bundles:
and one third party library:
This library is not existing on a 5.3.2 version of Nuxeo so we want to add it (not to upgrade it).
Also, for tomcat distributtions we need to deploy a mail.properties file in Nuxeo configuration directory. This file contains the SMTP configuration needed by javax.mail. On JBoss we already have this configuration as a JBoss MBean. This configuration is required by the SendMail operation. The configuration file is a Java property file and contains variables that will be substituted by the values entered by the user during the install wizard.
Here is the parametrized mail.properties file we want to install:
The package structure
Here is the structure of our package:
Here is our package manifest:
The install form
We need to define an additional page for the install wizard to ask for the properties needed to inject in the mail.properties file.
Here is the form definition we need
Note that the field IDs in the form are the same as the variable keys we need to inject into the mail.properties file
The install.xml script
Here is the content of the install.xml file
You can see the mail.properties is not installed if we are installing the package on a JBoss based distribution.