The task is used to associate the root folder of a project with resource definitions for source and object libraries. It also associates files with language definitions using the default patterns that are defined in language definitions when identified by langDefRule elements. These associations are stored in Jazz Source Control Management (SCM) as properties or name-value pairs.
An association between a file and a language definition can be made by using the file extension and the defaultPatterns attribute of a language definition; for example, if the language definition COBOL has a defaultPatterns attribute cbl, then by default, the file HELLO.cbl is associated with that language definition. Using the default association mechanism requires no file metadata definitions.
Another way to associate a file with a language definition is to directly assign a file to a language. This method requires file metadata to be created and saved with the file which is the purpose of the task.
The following table describes the task specific attributes for the task:
| Task Specific Attributes | ||
| Attribute | Description | Required |
| clean |
Whether to clear associations or to make associations. When it is set to clear, other task attributes are ignored and all associations are cleared. Valid values are true and false. The default is false.
|
No |
| projectRoot | Root directory of the component project. | No |
| sourcelibrary | Resource definition name for source library. | No |
| objectlibrary | Resource definition name for object library. | No |
| useDefaultRules |
Specifies whether or not to explicitly assign a language definition that is based on default file extensions. Valid values are true and false. The default is true.
Note: Use the default value with care. Any file matched while useDefaultRules is set to |
No |
The langDefRule element is specified within the element. Each langDefRule element defines an association between a file and a language definition. The following table describes the valid langDefRule attribute values:
| langDefRule Element Attributes | ||
| Attribute | Description | Required |
| match | A regular expression that is used for matching a file path name and the specified language definition. | Yes |
| languageDefinition | Specify the name of the Enterprise Extensions language definition to associate with the file. | Yes |
Associations can be made between files and language definitions that are stored in different project areas. The system definitions generator automatically collects all language definitions in all project areas in the same repository and associates files using the complete lists.
<xt:resolvemetadata sourcelibrary="sourceLibrary" objectlibrary="objectLibrary">
<xt:langdefrule match="QDDSSRC/MLGREFP\.PF$" languagedefinition="Build_Referenced_Files"/>
<xt:langdefrule match="QRPGLEINC/.+\.RPGLE$" languagedefinition="RPG_Include_Files(no_translators)"/>
</xt:resolvemetadata>