The macro is used to create a stream in the repository. If you specify a flow target or snapshot, the stream is populated with the components of that stream or snapshot.
The macro supports the SCM Macro Common Attributes, as well as, its own macro specific attributes. Click on the 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 |
| area | The name of the project or team area that will own the stream. | Yes |
| duplicate | The stream to duplicate. To specify the stream, use the name[@repo], alias, or UUID[@repo]. | No* |
| name | The name of the stream. | Yes |
| snapshot | The snapshot to use as the initial stream history. To specify the snapshot, use its name[@repo], alias, or UUID[@repo]. | No* |
| team |
Specify true if the area specified is a team area. The default is false, the area is a project area.
|
No |
| stream | The stream or workspace to use as the initial stream history. To specify the stream or workspace, use its name[@repo], alias, or UUID[@repo]. | No* |
This macro specifies the following options on the SCM command:
--duplicate <arg>
--projectarea
--snapshot <arg>
--stream <arg>
--teamarea
The following options can be added to the command using the additionalArgs element:
--auto-lock-files <arg>
--description <arg>
--json
<?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>
<import>
<javaresource name="scripts/smpe/imports/$scmcmd.xml">
<classpath location="${jarPath}"/>
</javaresource>
</import>
<xt:setPassword password="${password}" property="passwd"/>
<property name="userId" value="ADMIN"/>
<property name="conf" value="/var/MacroTestingScm/.jazz-scm"/>
<property name="root" value="/var/MacroTestingScm/root"/>
<property name="scmd" value="/var/MacroTestingScm/zips/scmtools/eclipse"/>
<!-- - - - - - - - - - - - - - - - - - - *
* Example *
*- - - - - - - - - - - - - - - - - - - -->
<target name="main" description="main">
<!-- Scm -->
<ScmProperties
authenticate="Password"
repository="repositoryAddress"
password="passwd"
userid="userId"
cfg="conf"
dir="root"
scm="scmd"
/>
<!-- Create -->
<ScmCreateStream area="${projectArea}" name="${stream}.new" stream="${stream}"/>
</target>
<target depends="main" description="all" name="all"/>
</project>