The macro is used to fetch the contents of the named repository workspace into a local destination directory.
The macro supports Team Build Attributes, as well as, its own macro specific attributes. Click on a link for more information on the common attributes.
The following table describes the macro specific attributes for the macro:
| Macro Specific Attributes | ||
| Attribute | Description | Required |
| buildResultUUID |
The UUID of the build result. The default value of this attribute is ${buildResultUUID} because that property is built-in when using the standard tooling.
|
No |
| componentLoadConfiguration |
When loadPolicy is set to useComponentLoadConfig, this attribute determines whether to load all components or exclude some components during load. Valid values are: loadAllComponents and excludeSomeComponents.
|
No |
| componentsToExcludeByName |
Specifies a semicolon-separated list of components names to exclude. This attribute is optional. By default, all components defined to the workspace will be fetched.
Note: Either componentsToExcludeByName or componentsToExcludeByUUID can be specified, but not both. |
No |
| componentsToExcludeByUUID |
Specifies a space-separated list of components UUIDs to exclude. This attribute is optional. By default, all components defined to the workspace will be fetched.
Note: Either componentsToExcludeByName or componentsToExcludeByUUID can be specified, but not both. |
No |
| createFoldersForComponents |
If true, component roots will be loaded as directories in the file system.
|
No |
| destination |
Local directory where the fetched files are to be stored. The default value of this attribute is ${team.scm.fetchDestination} because that property is built-in when using the standard tooling.
|
No |
| expandKeywords |
When enabled, any occurrence of a keyword in a file is converted to its expanded form. For example, the expanded form of $VersionId$ is the following for a file whose version ID is 10: $VersionId: 10$.
|
No |
| loadPolicy |
Determines whether to load the repository workspace according to componentLoadConfiguration or use a load rule file. Valid values are: useLoadRules and useComponentLoadConfig.
|
No |
| loadRulesByPath |
Specifies the path to a load rule file. The path begins with the component name followed by the full path to the load rule file in the repository. Use forward slashes (/) to separate path segments. Use a semicolon (;) to separate multiple load rule files.
Note: Either loadRulesByPath or loadRulesByUUID can be specified, but not both. |
No |
| loadRulesByUUID |
Specifies the UUIDs to the load rule file. The UUIDs are the item IDs of the component and load rule file. To get the UUIDs, use the web client to navigate to the load rule file (the URL specifies the item IDs). The ID of the component is followed by the ID of the file. Use spaces to separate multiple load rule files.
Note: Either loadRulesByPath or loadRulesByUUID can be specified, but not both. |
No |
| maxScmContentThreads | The number of simultaneous transfers that can occur at one time. The default value is 10. | No |
| preserveFileTimestamps | When enabled and the repository files are loaded, the timestamp from the file in the repository is used as the timestamp on disk. | No |
| workspaceName | The name of the workspace to fetch. | Yes |
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed Materials - Property of IBM
(c) Copyright IBM Corporation 2020. All Rights Reserved.
Note to U.S. Government Users Restricted Rights:
Use, duplication or disclosure restricted by GSA ADP Schedule
Contract with IBM Corp.
-->
<project
basedir="."
default="all"
name="Example"
xmlns:xt="antlib:com.ibm.team.build.extensions.toolkit">
<description>Example</description>
<!-- Load build extensions -->
<xt:loadBuildExtensions/>
<xt:getJarLocation property="jarPath"/>
<!-- Load common resources -->
<import>
<javaresource name="scripts/smpe/imports/$common.xml">
<classpath location="${jarPath}"/>
</javaresource>
</import>
<!-- - - - - - - - - - - - - - - - - - - *
* Example *
*- - - - - - - - - - - - - - - - - - - -->
<target name="main" description="main">
<FetchWorkspace workspaceName="My Workspace"/>
</target>
<target depends="main" description="all" name="all"/>
</project>