The task is used to delete folder metadata. Folder metadata is stored in Jazz Source Control Management (SCM) as properties or name-value pairs. To designate which folders to process and what properties to delete, nest FolderMetadataDeleteRule elements within the task element.
The following table describes the task specific attributes for the task:
| Task Specific Attributes | ||
| Attribute | Description | Required |
| clean |
Specify true to discard all current folder properties. Valid values are true and false. The default is false.
|
No |
| projectRoot | Root directory of the zComponent project. The default is the location where the Ant script executing the task is located. | No |
| verbose |
Specifies more message output. Valid values are true and false. The default is false.
|
No |
The FolderMetadataDeleteRule element is specified within the element. Each FolderMetadataDeleteRule element identifies a folder to process and a property to delete. At least one FolderMetadataDeleteRule element is required. The following table describes the valid FolderMetadataDeleteRule attribute values:
| FolderMetadataDeleteRule Element Attributes | ||
| Attribute | Description | Required |
| match |
The regular expression to match against the string "zFolder_name"; for example: match="COBOL" for the folder COBOL.
|
Yes |
| name | The name of the folder metadata property you want to delete when the regular expression matches the folder name. | Yes |
| value | The value of the file metadata property. A value is optional. If a value is specified, the current property value and the specified value must match for the property to be deleted. If a value is not specified, the property is deleted if found. | No |
A property value can be specified to selectively delete properties with the specified value.
If the clean="true" attribute is specified and a matched folder has no properties, no action is taken.
To delete all folder properties, specify the clean="true" attribute and a non-blank value for name in the Rule. For example:
<xt:folderMetadataDelete clean="true">
<xt:folderMetadataDeleteRule match="^ASM$" name="all"/>
</xt:folderMetadataDelete>
<!-- Folder Metadata Delete -->
<target name="folder" description="Folder Metadata Delete">
<xt:foldermetadatadelete>
<xt:foldermetadatadeleterule match="^ASM$" name="package.folder.fmid" value="01"/>
</xt:foldermetadatadelete>
</target>
Example log:
folder:
[xt:folderMetadataDelete] FolderMetadataDelete task starting
[xt:folderMetadataDelete] FolderMetadataDelete rule matched: "package.folder.fmid" property deleted for folder "ASM"
[xt:folderMetadataDelete] FolderMetadataDelete task complete