The task is used to delete file metadata. File metadata is stored in Jazz Source Control Management (SCM) as properties or name-value pairs. To designate which files to process and what properties to delete, nest FileMetadataDeleteRule 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 file 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 FileMetadataDeleteRule element is specified within the element. Each FileMetadataDeleteRule element identifies a file to process and a property to delete. At least one FileMetadataDeleteRule element is required. The following table describes the valid FileMetadataDeleteRule attribute values:
| FileMetadataDeleteRule Element Attributes | ||
| Attribute | Description | Required |
| match |
The regular expression to match against the string "zFolder_name/zFile_name". For example: match=".*/source\.cbl" for the file "COBOL/source.cbl".
|
Yes |
| name | The name of the file metadata property you want to delete when the regular expression matches the file 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 file has no properties, no action is taken.
To delete all file properties, specify the clean="true" attribute and a non-blank value for name in the Rule. For example:
<xt:fileMetadataDelete clean="true">
<xt:fileMetadataDeleteRule match=".*/BPEAQHT0\.asm" name="all"/>
</xt:fileMetadataDelete>
<!-- File Metadata Delete -->
<target name="file" description="File Metadata Delete">
<xt:fileMetadataDelete>
<xt:fileMetadataDeleteRule match=".*/BPEAQHT0\.asm" name="package.file.fmid" value="01"/>
</xt:fileMetadataDelete>
</target>
Example log:
file:
[xt:fileMetadataDelete] FileMetadataDelete task starting
[xt:fileMetadataDelete] FileMetadataDelete rule matched: "package.file.fmid" property deleted for file "BPEAQHT0.asm"
[xt:fileMetadataDelete] FileMetadataDelete task complete