This page last changed on Jan 07, 2010 by csut017.

Package Publisher

Generates a ZIP file package containing the specified files.
This will generate a "package" of files in a compressed format. The files must be specified, plus an optional manifest can be included.
This publisher also allows the generation of a "manifest" to include in the package. A manifest contains additional details on the package, both at a general level and at a file level.

Version

Available from version 1.4.4

Examples

Minimalist example
<package>
  <name>Example</name>
  <files>
    <file>Results.txt</file>
  </files>
</package>
Full example
<package>
  <name>Example</name>
  <compression>9</compression>
  <always>true</always>
  <flatten>true</flatten>
  <baseDirectory>C:\Builds\CC.Net</baseDirectory>
  <manifest type="defaultManifestGenerator" />
  <files>
    <file>Results.txt</file>
  </files>
</package>

Configuration Elements

Element Description Type Required Default Version
always Whether the package should always be generated or not.
By default a package will only be generated for a successful build. Setting this property to true, and including it in the publishers section means the package will always be generated, irrespective of the outcome of the build.
Boolean No false 1.4.4
baseDirectory The directory to base all the file locations from. String No Project working directory 1.4.4
compression The level of compression to use. The valid range is from zero to nine, zero is no compression and nine is maximum compression. Int32 No 5 1.4.4
description Description used for the visualisation of the buildstage, if left empty the process name will be shown. String No The task/publisher name. 1.5
dynamicValues The dynamic values to use for the task. Dynamic Values array No None 1.5
files The files to include in the package.
All relative files will be relative to the baseDirectory.
String array Yes n/a 1.4.4
flatten Should the file structure be flattened or not.
By default, the folder structure will also be included in the package. Setting this property to true will flatten (omit) the folder information.
Boolean No false 1.4.4
manifest The manifest generator to be used.
If this property is not set no manifest will be generated.
Manifest Generators No None 1.4.4
outputDir The location to output the package to. String No Project Artifact Directory 1.4.4
name The name of the package file.
This will be the filename of the package. If the extension zip is omitted, it will be added automatically.
String Yes n/a 1.4.4

Notes

Sub-folders

Sub-folders can be added using a combination of relative paths in the filename and a base directory. When a file is added, the publisher checks if the filename is relative to the base directory and strips the base directory from the file name.
For example, the following configuration will add two files, logo.gif in the root and AdminIcon.gif in a sub-folder.

<package>
  <baseDirectory>temp</baseDirectory>
  <files>
    <file>logo.gif</file>
    <file>images\AdminIcon.gif</file>
  </files>
  <name>output</name>
</package>
Automatically Generated

Documentation generated on Thursday, 7 Jan 2010 at 10:07:16 PM

Document generated by Confluence on Jan 23, 2011 08:52