The task is used to export build definitions from the Jazz™ repository into an executable Ant build script as a createBuildDefinition or updateBuildDefinition task embedded in a Build.Definitions target. The task can be used to export a single build definition, or a series of build definitions, into a fully formatted Ant build script. The generated build script can be used for build definition recovery, backup and restore of the build definition, moving the build definition to another repository, and/or ongoing maintenance of the build definition.
The task supports Team Build Attributes, Build Extensions Debugging Attributes, Build Extensions General Attributes, as well as, its own task specific attributes. Click on a link for more information on the common attributes.
The following table describes the task specific attributes for the task:
| Task Specific Attributes | ||
| Attribute | Description | Required |
| buildId | The ID of the build to export. A buildId attribute is not required if at least one buildDefinition element is specified. If no buildDefinition elements are specified, a buildId attribute is required. | No |
| buildWorkspace | The name of a workspace to use as a reference for streams, components, projects and files used by the build and included in the build definition. This does not have to be the workspace that is used by the build, but it can be. It must be a workspace that is attached to the same streams, components, projects, and files used by the build. This workspace is used as a prototype for any workspace that is created by the createBuildDefinition task for build properties (see: createWorkspace for more information on workspaces created for build properties). It is also used to locate streams, components, projects, and files referenced by build properties. Note: This workspace must exist prior to running the createBuildDefinition task. | Yes |
| commaSeparated |
This option controls how list items for build properties are specified. Valid values are: true and false. If true, any build property that can be specified as a list must have items separated by commas. If false, list items must be separated by a space. The default is true.
|
No |
| createReport |
This option controls whether or not a build definition report is generated. Valid values are: true and false. If true, a build definition report is generated. If false, no report is generated. If other report attributes are specified and createReport is set to false, no report is generated and the other report attributes are ignored. The default is true.
|
No |
| exportAll |
Specify true to export all build definitions defined to the specified process area. The default is false. Any value specified for buildId and any buildDefinition elements specified will be ignored.
|
No |
| exportAsis |
Specify true to have build property values exported "asis" and to have the asis attribute added to the build property elements. An "asis" property value means that the value is already in its resolved form. For example, if a build property specifies a workspace name, the unresolved form of the value is the name of the workspace and the resolved form of the value is a workspace UUID string. When the asis attribute is set to true, it signifies that the workspace value is already in UUID form. This attribute is optional. The default is false.
|
No |
| exportCreate |
Specify true to have a createBuildDefinition task created by the export. Specify false to have an updateBuildDefinition task created by the export. The default is true.
|
No |
| exportFile | The name of the export file. This is the file where the Ant script with exported build definition is written. Since the export file is also an Ant build script, the file extension typically used for this file would be "xml". | Yes |
| exportFolder | The name of the export file folder. This is the location for the export file. A fully qualified path is required. | Yes |
| exportFormat |
This option controls whether or not the resulting export file, and the XML it contains, is formatted for human consumption. Specify true to have the XML formatted into a more readable form. Specify false to create a standard, compact XML file. The default is true.
|
No |
| exportInternal |
This option controls whether or not internal properties are exported. Valid values are: true and false. Specify true to export internal build properties. Specify false to skip the export of internal build properties. The default is false.
|
No |
| exportLog |
This option controls whether or not the resulting export file is written to the console as well as the file. Specify true to write the XML to the console, or build log, in addition to the file. Specify false to write the XML only to the export file. The default is false.
|
No |
| exportReportAppend |
This option controls the contents of the reportAppend attribute on the exported createBuildDefinition or updateBuildDefinition task. Specify true to have the reportAppend="true" attribute added to the task. Specify false to have the reportAppend="false" attribute added to the task. If this attribute is omitted, the reportAppend attribute will be omitted from the task in the export.
|
No |
| exportReportCondensed |
This option controls the contents of the reportCondensed attribute on the exported createBuildDefinition or updateBuildDefinition task. Specify true to have the reportCondensed="true" attribute added to the task. Specify false to have the reportCondensed="false" attribute added to the task. If this attribute is omitted, the reportCondensed attribute will be omitted from the task in the export.
|
No |
| exportReportFile |
This option controls the contents of the reportFile attribute on the exported createBuildDefinition or updateBuildDefinition task. Specify a file_name to have the reportFile="file_name" attribute added to the task. If this attribute is omitted, the reportFile attribute will be omitted from the task in the export.
|
No |
| exportReportFolder |
This option controls the contents of the reportFolder attribute on the exported createBuildDefinition or updateBuildDefinition task. Specify a folder_path to have the reportFolder="folder_path" attribute added to the task. If this attribute is omitted, the reportFolder attribute will be omitted from the task in the export.
|
No |
| exportReportNoUuid |
This option controls the contents of the reportNoUuid attribute on the exported createBuildDefinition or updateBuildDefinition task. Specify true to have the reportNoUuid="true" attribute added to the task. Specify false to have the reportNoUuid="false" attribute added to the task. If this attribute is omitted, the reportNoUuid attribute will be omitted from the task in the export.
|
No |
| exportReportOnly |
This option controls the contents of the reportOnly attribute on the exported createBuildDefinition task. Specify true to have the reportOnly="true" attribute added to the task. Specify false to have the reportOnly="false" attribute added to the task. If this attribute is omitted, the reportOnly attribute will be omitted from the task in the export. This option is recognized only if exportCreate is set to true.
|
No |
| exportReportSorted |
This option controls the contents of the reportSorted attribute on the exported createBuildDefinition or updateBuildDefinition task. Specify true to have the reportSorted="true" attribute added to the task. Specify false to have the reportSorted="false" attribute added to the task. If this attribute is omitted, the reportSorted attribute will be omitted from the task in the export.
|
No |
| ignoreErrors |
Specify true to ignore errors encountered while fetching a build property value. The default is false. This option can be used when build properties reference repository items that have been deleted. Normally a build exception would be generated when an item can not be found or fetched. This option ignores those errors and allows the export to complete. When using this option review the export XML file, any error will be flagged with "ERROR:" followed by the exception message that would have been issued.
|
No |
| processAreaName | The name of the EWM process area where the build is defined. | Yes |
| processAreaNameDefinitions | The name of the EWM process area where Enterprise Extensions resource definitions used by this build are defined. If not specified, the EWM process area identified by the processAreaName attribute is used. | No |
| reportAppend |
This option controls whether the build definition report is appended to, or overwrites, the specified report file. Valid values are: true and false. If true, the build definition report will be appended to the specified report file. If false, the build definition report will overwrite (replace) the specified report file. The default is false.
|
No |
| reportCondensed |
This option controls the format of build properties written to the build definition report. Valid values are: true and false. If true, each build property will be reported on a single line, displaying only the name and value of the property. If false, each build property will be reported on multiple lines, displaying each attribute of the build property on a line. The default is false.
|
No |
| reportFile | The name of the report file. If a reportFile is specified, the build definition report will be written to the file. If omitted, the build definition report will be written to the build log. | No |
| reportFolder | The name of the report file folder. This is the location for the report file. A fully qualified path is required. | No |
| reportNoUuid |
This option controls whether or not UUID values are printed. Valid values are: true and false. If true, UUID values are printed x-ed out. If false, UUID values are printed as strings. The default is false.
|
No |
| reportSorted |
This option controls whether or not build properties are reported in sorted order in the build definition report. Valid values are: true and false. If true, build properties are reported in sorted name order. If false, build properties are reported in random order. The default is false.
|
No |
One or more buildDefinition elements can be specified within the element. Build definition elements are used to identify a series of build definitions to export. Both the buildId attribute and buildDefinition elements can be specified. At least one buildDefinition element, or the buildId attribute, is required.
The following table describes the valid buildDefinition element attributes and their options:
| buildDefinition Element Attributes | ||
| Attribute | Description | Required |
| buildId | The ID of the build to export. | Yes |
| buildWorkspace | The name of the workspace to use as a reference for streams, components, projects and files used by the build and included in the build definition. This does not have to be the workspace that is used by the build, but it can be. It must be a workspace that is attached to the same streams, components, projects, and files used by the build. This workspace is used as the prototype for any workspace defined to the build that is created by the createBuildDefinition task. If this attribute is omitted, the buildWorkspace specified for the task will be used. | No |
| exportReportAppend |
This option controls the contents of the reportAppend attribute on the exported createBuildDefinition or updateBuildDefinition task. Specify true to have the reportAppend="true" attribute added to the task. Specify false to have the reportAppend="false" attribute added to the task. If this attribute is omitted and the attribute was omitted from the task, the reportAppend attribute will be omitted from the task in the export. If this attribute is omitted here, but is specified on the task, the value from the task will be used.
|
No |
| exportReportCondensed |
This option controls the contents of the reportCondensed attribute on the exported createBuildDefinition or updateBuildDefinition task. Specify true to have the reportCondensed="false" attribute added to the task. If this attribute is omitted and the attribute was omitted from the task, the reportCondensed attribute will be omitted from the task in the export. If this attribute is omitted here, but is specified on the task, the value from the task will be used.
|
No |
| exportReportFile |
This option controls the contents of the reportFile attribute on the exported createBuildDefinition or updateBuildDefinition task. Specify a file_name to have the reportFile="file_name" attribute added to the task. If this attribute is omitted and the attribute was omitted from the task, the reportFile attribute will be omitted from the task in the export. If this attribute is omitted here, but is specified on the task, the value from the task will be used.
|
No |
| exportReportFolder |
This option controls the contents of the reportFolder attribute on the exported createBuildDefinition or updateBuildDefinition task. Specify a folder_path to have the reportFolder="folder_path" attribute added to the task. If this attribute is omitted and the attribute was omitted from the task, the reportFolder attribute will be omitted from the task in the export. If this attribute is omitted here, but is specified on the task, the value from the task will be used.
|
No |
| exportReportNoUuid |
This option controls the contents of the reportNoUuid attribute on the exported createBuildDefinition or updateBuildDefinition task. Specify true to have the reportNoUuid="true" attribute added to the task. Specify false to have the reportNoUuid="false" attribute added to the task. If this attribute is omitted and the attribute was omitted from the task, the reportNoUuid attribute will be omitted from the task in the export. If this attribute is omitted here, but is specified on the task, the value from the task will be used.
|
No |
| exportReportOnly |
This option controls the contents of the reportOnly attribute on the exported createBuildDefinition. Specify true to have the reportOnly="true" attribute added to the task. Specify false to have the reportOnly="false" attribute added to the task. If this attribute is omitted and the attribute was omitted from the task, the reportOnly attribute will be omitted from the task in the export. If this attribute is omitted here, but is specified on the task, the value from the task will be used. This option is recognized only if exportCreate is set to true.
|
No |
| exportReportSorted |
This option controls the contents of the reportSorted attribute on the exported createBuildDefinition or updateBuildDefinition task. Specify true to have the reportSorted="true" attribute added to the task. Specify false to have the reportSorted="false" attribute added to the task. If this attribute is omitted and the attribute was omitted from the task, the reportSorted attribute will be omitted from the task in the export. If this attribute is omitted here, but is specified on the task, the value from the task will be used.
|
No |
| processAreaNameDefinitions | The name of the EWM process area where Enterprise Extensions resource definitions are defined that are used by this build. If not specified, the EWM process area identified by the processAreaName attribute is used. | No |
| reportAppend |
This option controls whether the build definition report is appended to or overwrites the specified report file. Valid values are: true and false. If true, the build definition report will be appended to the specified report file. If false, the build definition report will overwrite the specified report file. If this attribute is omitted here, but is specified on the task, the value from the task will be used. The default is false.
|
No |
| reportCondensed |
This option controls the format of build properties written to the build definition report. Valid values are: true and false. If true, each build property will be reported on a single line, displaying only the name and value of the property. If false, each build property will be reported on multiple lines, displaying each attribute of the build property on a line. If this attribute is omitted here, but is specified on the task, the value from the task will be used. The default is false.
|
No |
| reportFile | The name of the report file. If a reportFile is specified, the build definition report will be written to the file. If omitted, the build definition report will be written to the build log. If this attribute is omitted here, but is specified on the task, the value from the task will be used. | No |
| reportFolder | The name of the report file folder. This is the location for the report file. A fully qualified path is required. If this attribute is omitted here, but is specified on the task, the value from the task will be used. | No |
| reportNoUuid |
This option controls whether or not UUID values are printed. Valid values are: true and false. If true, UUID values are printed x-ed out. If false, UUID values are printed as strings. If this attribute is omitted here, but is specified on the task, the value from the task will be used. The default is false.
|
No |
| reportSorted |
This option controls whether or not build properties are reported in sorted order in the build definition report. Valid values are: true and false. If true, build properties are reported in sorted order. If false, build properties are reported in random order. If this attribute is omitted here, but is specified on the task, the value from the task will be used. The default is false.
|
No |
true, any unique workspaces required by a build, and not found in the repository, will be automatically created by the createBuildDefinition task using the prototype workspace as a model when the build definition is created. This feature can be used to avoid the overhead of manually creating individual workspaces for a series of builds.
Export build definition
<target name="export" description="Export Build Definition">
<xt:exportbuilddefinition
repositoryAddress="${repositoryAddress}"
userId="${userId}"
password="${password}"
buildId="Test.djr.Dpnd.013"
buildWorkspace="Test.djr.Stream.000.Workspace"
processAreaName="${paDJR}"
processAreaNameDefinitions="Liams PA"
exportFile="BuildDefinition.000.xml"
exportFolder="C:\Users\djreilly\Downloads"
exportFormat="true"
exportLog="true"
exportReportCondensed="true"
exportReportFile="Test.djr.Dpnd.013.txt"
exportReportFolder="C:\Users\djreilly\Downloads"
exportReportSorted="true">
</xt:exportbuilddefinition>
<xt:exportbuilddefinition
repositoryAddress="${repositoryAddress}"
userId="${userId}"
password="${password}"
buildId="Test.djr.Dpnd.013"
buildWorkspace="Test.djr.Stream.000.Workspace"
processAreaName="${paDJR}"
processAreaNameDefinitions="Liams PA"
exportFile="BuildDefinition.001.xml"
exportFolder="C:\Users\djreilly\Downloads"
exportFormat="true"
exportLog="true"
exportReportCondensed="true"
exportReportFile="Test.djr.Dpnd.013.txt"
exportReportFolder="C:\Users\djreilly\Downloads"
exportReportSorted="true"
>
<xt:buildDefinition buildId="Test.djr.Dpnd.000" processAreaNameDefinitions="${paDJR}" exportReportFile="Test.djr.Dpnd.000.txt"/>
<xt:buildDefinition buildId="Test.djr.Dpnd.001" processAreaNameDefinitions="${paDJR}" exportReportFile="Test.djr.Dpnd.001.txt"/>
<xt:buildDefinition buildId="Test.djr.Dpnd.010" processAreaNameDefinitions="${paDJR}" exportReportFile="Test.djr.Dpnd.010.txt"/>
<xt:buildDefinition buildId="Test.djr.Dpnd.011" processAreaNameDefinitions="${paDJR}" exportReportFile="Test.djr.Dpnd.011.txt"/>
<xt:buildDefinition buildId="Test.djr.Dpnd.012" exportReportFile="Test.djr.Dpnd.012.txt"/>
</xt:exportbuilddefinition>
</target>