fileMetadataDelete

The fileMetadataDelete task deletes 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 fileMetadataDelete task element.

Note: This task does not recognize the password file that other tasks accept to log in to the Jazz repository.

The following table describes the fileMetadataDelete 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 that runs the fileMetadataDelete task is located.

No

verbose

More message output. The default value is false.

No

fileMetadataDeleteRule Elements

The fileMetadataDeleteRule element is specified in the fileMetadataDelete 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 fileMetadtaDeleteRule element attributes.

Attribute Description Default Required

match

The regular expression to match against the zFolder name/zFile name string. For example, you can specify match=".*/source\.cbl" for the COBOL/source.cbl file.

None

Yes

name

The name of the file metadata property to be deleted when the regular expression matches the zFolder name/zFile name string.

None

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 no value is specified, the property is deleted if it is found.

None

No

Note:
  • This task must be run in an Eclipse environment.
  • 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 the file properties, specify the clean="true" attribute and a non-blank value for the name in the fileMetadataDeleteRule. For example, you can enter the following code:
    <xt:fileMetadataDelete clean="true">
      <xt:fileMetadataDeleteRule match=".*/BPEAQHT0\.asm" name="all"/>
    </xt:fileMetadataDelete>

Example

You can enter the following code to delete a property from a file:
<!-- 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>