fileMetadataDelete

The fileMetadataDelete task deletes file metadata.

File metadata is stored in Jazz source control management as properties or name value pairs. To designate which file to process and what properties to delete, nest fileMetadataDelete rRule elements in the fileMetadataDelete task.

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

No

verbose

Specifies more message output. The default 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 string (zFolder name) (zFile name). For example, DOBOL/source.cbl.

None

Yes

name

The name of the file metadata property you want to delete when the regular expression matches the string (zFolder name)/(zFile name).

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 a value is not specified, the property is deleted if 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 file properties, specify the clean="true" attribute and a non-blank value for name in the fileMetadataDeleteRule. For example:
    <im:filemetadatadelete celan="true">
    	<im:filemetadatadeletetrule match=".*/BPEAQHT0\.asm" name="all"/>
    </im:filemetadatadelete>

Example

Delete a property from a file
<!-- File Metadata Delete -->
<target name="file" description="File Metadata Delete">

	<im:filemetadatadelete>
		<im:filemetadatadeleterule match=".*/BPEAQHT0\.asm" name="package.file.fmid" value="01"/>
	</im:filemetadatadelete>

</targe>

video icon Video

Jazz.net channel
Software Education channel

learn icon Courses

IoT Academy
Skills Gateway

ask icon Community

Jazz.net
Jazz.net forums
Jazz.net library

support icon Support

IBM Support Community
Deployment wiki