The task is used to create or update 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 create, nest FileMetadataRule elements within the task element.
The following table describes the task specific attributes for the task:
| Task Specific Attributes | ||
| Attribute | Description | Required |
| 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 FileMetadataRule element is specified within the element. Each FileMetadataRule element identifies a file to process and a property to create or update. At least one FileMetadataRule element is required. The following table describes the valid FileMetadataRule attribute values:
| FileMetadataRule 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 modify when the regular expression matches the file name. | Yes |
| value | The value of the file metadata property. Empty strings are allowed and do not result in a property being deleted. If a value is not specified, the property value will default to an empty string. | No |
The LineDelimiterRule element is specified within the element. Each FileMetadataRule element identifies a file to process and a line delimiter to set. The following table describes the valid FileMetadataRule attribute values:
| LineDelimiterRule 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 | ||||||||||||
| value |
The line delimiter to use for the file. Valid values are:
|
Yes | ||||||||||||
<!-- File Metadata Define -->
<target name="file" description="File Metadata Define">
<xt:fileMetadata>
<xt:fileMetadataRule match="^PLX/DFSDGSA0\.plx$" name="team.enterprise.build.var.CMPRENT" value="RENT"/>
</xt:fileMetadata>
</target>
mvsCodePage property for zFiles under the zFolder COBOL are set to IBM-939, the EPSCMORT.cbl team.enterprise.build.alwaysload property is set to true, and the line delimiter for file extension .bms is set to Platform:
<xt:filemetadata projectRoot="../MortgageApplication-EPSCMORT">
<xt:filemetadatarule match="COBOL/.*" name="mvsCodePage" value="IBM-939"/>
<xt:filemetadatarule match="COBOL/EPSCMORT.cbl$" name="team.enterprise.build.alwaysload" value="true"/>
<xt:linedelimiterrule match=".*/.*.bms$" value="Platform"/>
</xt:filemetadata>