Skip to content

Deployment Properties File

DanielBerman edited this page Aug 26, 2013 · 5 revisions

What is it?

The Zend SDK allows you to create an application package(.zpk). The default package structure consists of the following files:

  • 'appdir'
  • 'scriptsdir'
  • 'deployment.xml'

'appdir' and 'scriptsdir' (optional) are directories defined in a descriptor file (for more details about descriptor file, see Descriptor?). 'appdir' consists of the whole application which should be deployed. 'scriptsdir' is a container for the deployment scripts.

The 'deployment.properites' file is used during the package creation process, and defines what should be included in the 'appdir' and 'scriptsdir' directories. For example, the 'deployment.properties' file could look like this:

appdir.includes = public, other/abc.php
appdir.excludes = public/not_include
scriptsdir.includes = scripts/post_activate.php,scripts/pre_stage.php

If 'appdir' name is 'data' (defined in the descriptor) and 'scriptsdir' is 'my_scripts', then the created deployment package will look as follows:

  • The data folder will contain the 'other/abc.php' file, and the whole public folder except public/not_include,
  • 'my_scripts' will contain two files from the scripts folder: post_activate.php and pre_stage.php.

Syntax

Deployment properties file is a standard properties file which can have up to 4 entries with the following keys:

  • appdir.includes - list of files which should be in the 'appdir' directory,
  • appdir.excludes - list of files which should not be in the 'appdir' directory,
  • scriptsdir.includes - list of files which should be in the 'scriptsdir' directory,
  • scriptsdir.excludes - list of files which should not be in the 'scriptsdir' directory.

There are 3 available ways to define inclusion/exclusion rules:

  • Project root relative path to the concrete file, e.g.:

    public/myFile

As a result, the whole file with its content (if it is a directory) is considered.

  • file name with **/ prefix, e.g.:

    **/.svn

As a result, all files with specified name will be considered. It should be used only for exclusion.

Default exclusion list

This list is applied for all entries in deployment properties file. By default, it consists of the following files:

  • **/.svn
  • **/.git
  • **/.cvs

It is possible to add/remove files from it by modifying tools\conf\excludes.default file in the Zend SDK.