The macro is used to fetch the contents of a repository workspace into a local destination directory using the UUID of the workspace rather than its name.
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 |
| 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 |
| 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 |
| workspaceUUID |
The UUID of the workspace to fetch. The default value for this attribute is the ${team.scm.workspaceUUID}.
|
Yes |
${team.scm.workspaceUUID} using the Common Macros automated login option and the defaults for build result UUID, destination, and number of threads:
<?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">
<FetchWorkspaceById workspaceUUID="${team.scm.workspaceUUID}"/>
</target>
<target depends="main" description="all" name="all"/>
</project>