NaturalONE Version 8.3.7
 —  Using NaturalONE  —

Using a Master Deployment

This document covers the following topics:


General Information

With a master deployment, you can combine the different types of deployment which are available with NaturalONE into a single common process. A master deployment is an Ant script that simply runs any existing project-specific Ant scripts in a configurable manner. Prerequisites:

The wizard for a master deployment collects information about the deployments to be processed and creates a full deployment kit, containing all necessary Ant scripts as well as the necessary JAR files used for deployment.

Note:
With a master deployment, it is no longer required to manually copy the JAR files and the files that are created by the different deployment wizards. When you specify the corresponding options for the creation of the external deployment package, these files are automatically added to the deployment package. You can also specify to create a zip archive which then contains the required JAR files.

Top of page

Using the Deployment Wizard for a Master Deployment

The deployment wizard creates the following files:

Start of instruction setTo use the deployment wizard

  1. In the Navigator view or in the Natural Navigator view, select the project in which you want to create the master deployment file.

    Any type of project can be used here. It is not required that you select a Natural or Java project. For example, this may be a project that you have created for the sole purpose of holding the master deployment script.

    Or:
    If you want to load the settings of an existing master deployment file, select this file in the Navigator view or in the Natural Navigator view.

  2. From the File menu or from the context menu, choose New > Other.

  3. In the resulting New dialog box, expand the Natural node, select Deploy Natural Master Ant and then choose the Next button.

    The first page of the wizard appears (see below).

  4. Specify all required information as described in the topics below. Use the Next button repeatedly to proceed from the first page of the wizard to the last page.

  5. When all required information has been provided, choose the Finish button.

The different pages of the deployment wizard are described in the following topics:

General Settings

On the first page of the wizard, you can define a different name for the master deployment file.

Deploy

Deployment file

The default name for the master deployment file is masterdeploy.xml. This name is shown in this text box when an existing master deployment file was not selected while invoking the wizard. However, when an existing master deployment file was selected, the name of the selected file is shown and the settings from this file are automatically loaded.

You can enter any other name for your new deployment file. It is recommended that your new deployment file also has the extension ".xml".

Note:
If you keep the name masterdeploy.xml, the settings from an existing master deployment file with the same name are loaded the next time you select the project and invoke the wizard.

If you want to load an existing master deployment file, choose the Browse button. A dialog appears, providing for selection all master deployment files in the current project. Next, you have to choose the Load from File button. Otherwise, the settings in this file are not shown in the wizard and may thus be overwritten unintentionally.

If you want to return to the default settings of the deployment wizard, choose the Load Defaults button.

Application Selection

On the second page of the wizard, you select the deployment files that are to be included in the master deployment (by selecting the check boxes in the Selected column). By default, all deployment files that can be found in your workspace are listed on this page.

Deploy

Using the buttons to the right of the list of deployment files, you can change the sequence of the deployment files, you can delete deployment files and you can add them again. You can also modify the name of a deployment file.

External Package Creation

On the third page of the wizard, you specify whether an external deployment package is to be created. If you want to start the deployment outside of Eclipse, you have to create such a package.

An external deployment package consists of all necessary Ant deployment scripts (as determined by the selected projects on the previous wizard page) and optionally the set of necessary JAR files.

Deploy

Create external deployment package

When selected, all other options on this page are enabled. It is important that you specify the package directory.

When not selected, only the master deployment file will be created in the root directory of the selected project. In this case, the deployment can only be started from within Eclipse.

Package directory

The path to the directory to which the deployment files are to be copied.

Copy deployment JAR files

When enabled, the JAR files which are listed under Prerequisites in the section Deploying Natural Applications are added to the deployment package.

Create ZIP archive instead of single files

When enabled, a zip archive is created instead of single files. The zip archive has the same name as the master deployment file, but with the extension ".zip".

Top of page

Starting the Deployment from Eclipse

When you start the deployment process from Eclipse, it is not possible to execute the checkout and update targets of the deployment file since these targets would access the versioning repository, and this is not feasible from within an Eclipse environment. If you want to check out a specific revision from the versioning repository or if you want to update your project with sources from the versioning repository, you have to start the deployment from the command line as described below.

For testing purposes, for example, it is helpful to start the deployment process from Eclipse. Since the master deployment file is an Ant script, the built-in Eclipse functionality of starting Ant scripts is used here. The build target of the Ant script will then be executed.

Start of instruction setTo start the deployment from Eclipse

Top of page

Starting the Deployment from the Command Line

You can start the deployment process from a Windows command line such as the Command Prompt (cmd.exe) or from a shell command line on a Linux system. When you start the deployment from the command line, special requirements must be met.

The following topics are covered below:

Prerequisites

The prerequisites for a master deployment are the same as for deploying Natural applications. See Prerequisites in Deploying Natural Applications. However, you do not have to copy any files manually. This is automatically done by the master deployment.

Make sure that all necessary tools which are referred to in the project-specific build scripts are available and accessible on the processing platform.

Make sure that the files from the external package are in place. If you have chosen to create a zip archive, you have to unpack this file.

Starting the Deployment

When all prerequisites are in place, the deployment can be started by issuing specific Ant calls. This section just provides some examples (where the default name masterdeploy.xml is used). It is assumed that the JAR files have been placed in the directory in which you are currently working.

Note:
When using the checkout, update and build targets of the master deployment file, the master deployment file actually makes calls into the corresponding project-specific deployment files for Natural, Java and/or Ajax.

Top of page