This page last changed on Nov 19, 2006 by orogers.

The Build Publisher lets you copy any arbitrary files on a successful build.

Example

<buildpublisher>
     <sourceDir>C:\myprojects\project1</sourceDir>
     <publishDir>\\myfileserver\project1</publishDir>
     <useLabelSubDirectory>false</useLabelSubDirectory>
</buildpublisher>

This will copy the contents of C:\myprojects\project1 to the network share \\myfileserver\project1.

Minimal Configuration Example

<buildpublisher />

This will copy the contents of the project's working directory to a new label subdirectory under the project's artifact directory (ie <artifact_dir>\<label_dir>)

Configuration Elements:

Node Description Type Required Default
sourceDir The source directory to copy files from. This path can be absolute or can be relative to the project's working directory. If unspecified, the project's working directory will be used as the source directory. string false n/a
publishDir The directory to copy the files to. This path can be absolute or can be relative to the project's artifact directory. If useLabelSubDirectory is true (default) a subdirectory with the current build's label will be created, and the contents of sourceDir will be copied to it. If unspecified, the project's artifact directory will be used as the publish directory. string false n/a
useLabelSubDirectory If set to true (the default value), files will be copied to subdirectory under the publishDir which will be named with the label for the current integration. bool false true

This block used to support a 'additionalDir' attributed. This feature has been removed - just use multiple <buildpublisher> blocks to achieve the same job.
The useLabelSubDirectory property has been added in 1.2.

Might be nice if a fileset could be included...

<source>C:\myprojects\project1*-results.xml</source>

Posted by dcameron at Jan 14, 2007 23:17

As far as I can tell, it is ignoring the false value I inserted as a value for 'useLabelSubdirectory'. It keeps creating sub-folders in the target directory with the files, and placing the files therein. To avoid typographical errors, I cut-and-pasted the sample form above.

Posted by actualrandy at Feb 28, 2007 11:12
Document generated by Confluence on Jun 21, 2007 10:33