Task and Type Reference

commit-classes

This task commits model objects to class files. [M]

The commit-classes task supports the following attributes:

Attribute Description Required
classesDirectory The directory holding the class files to commit model objects to. Yes.
classFileProcessorClass Class of the ClassFileProcessor backing the task. No. [A]
classpathRef A reference to a class path to process. No. Either the classpathRef attribute or the nested classpath element is supported.
classProcessingEnabled A flag indicating the processing of classes is enabled. No. Defaults to true.
defaultTemplateEncoding The default encoding to use for reading templates. Since 1.3 No.
defaultTemplateProfile The default template profile to use when accessing templates. No. [B]
if Object controlling the execution of the task. No.
implementation The identifier of an implementation to process. No. If the implementation, specification and module attributes are not set, all modules will be processed.
indentation The indentation string ('\t' for tab). No.
inputEncoding The encoding to use for reading files. No. Defaults to the system's default encoding.
javaValidationEnabled A flag indicating Java validation is enabled. No. Defaults to true.
lineSeparator The line separator ('\r\n' for DOS, '\r' for Mac, '\n' for Unix). No. Defaults to the system's line separator.
model The public identifier of the model to process. No. Defaults to the JOMC model public id. [C]
modelContextClassName The name of the ModelContext implementation class backing the task. No. [D]
modelObjectClasspathResolutionEnabled A flag indicating model object class path resolution is enabled. No. Defaults to true.
modelProcessingEnabled A flag indicating the processing of models is enabled. No. Defaults to true.
modelResourceValidationEnabled A flag indicating JAXP schema validation of model resources is enabled. No. Defaults to true.
modletLocation The class path location searched for modlets. No. [E]
modletResourceValidationEnabled A flag indicating JAXP schema validation of modlet resources is enabled. No. Defaults to true.
modletSchemaSystemId The http://jomc.org/modlet namespace schema system id. No. [F]
module The identifier of a module to process. No. If the implementation, specification and module attributes are not set, all modules will be processed.
moduleLocation The class path location searched for modules. No. [G]
outputEncoding The encoding to use for writing files. No. Defaults to the system's default encoding.
platformProviderLocation The location searched for platform provider resources. No. [H]
providerLocation The class path location searched for providers. No. [I]
specification The identifier of a specification to process. No. If the implementation, specification and module attributes are not set, all modules will be processed.
templateEncoding The encoding to use for reading templates. No. As of JOMC 1.3, replaced by attribute defaultTemplateEncoding. This attribute will be removed in JOMC 2.0.
templateLocation Location to search for templates in addition to searching the class path of the task. The value is parsed to an URL first. On successful parsing, that URL is used. Failing that, the value is interpreted as a directory name relative to the project's base directory. If that directory is found, the URL of that directory is used. Otherwise a warning message is logged. No.
templateProfile The template profile to use when accessing templates. No. [B]
transformerLocation The class path location searched for transformers. No. [J]
unless Object controlling the execution of the task. No.

The commit-classes task supports the following nested elements:

Element Description Required
classpath Class path to process. No. Either the classpathRef attribute or the nested classpath element can be used.
locale Locale of the task. Type: LocaleType No.
modelContextAttribute ModelContext attribute to apply. Type: KeyValueType No.
modelObjectStylesheetResource XSLT document to use for transforming model objects. Type: TransformerResourceType No.
moduleResource Additional module resource. Type: ModuleResourceType No.
templateParameterResource Properties resource holding properties passed to the template engine backing the task. Type: PropertiesResourceType No.
templateParameter Parameter passed to the template engine backing the task. Type: KeyValueType No.
transformationParameterResource Properties resource holding properties to be passed to all transformers of the task. Type: PropertiesResourceType No.
transformationParameter Transformation parameter to be passed to all transformers of the task. Type: KeyValueType No.
transformationOutputProperty Transformation output property to be passed to all transformers of the task. Type: KeyValueType No.
velocityPropertyResource Properties resource holding properties to to be used to configure the Velocity engine backing the task. Type: PropertiesResourceType No.
velocityProperty Property to be used to configure the Velocity engine backing the task. Type: KeyValueType No.

Example: Committing model objects to class files.

<jomc:commit-classes xmlns:jomc="antlib:org.jomc.ant"
      classpathRef="this.module.runtime.classpath"
      module="${this.module.name}"
      classesDirectory="${this.module.classes.dir}"/>

generate-resources

This task generates resource files. [N]

The generate-resources task supports the following attributes:

Attribute Description Required
classpathRef A reference to a class path to process. No. Either the classpathRef attribute or the nested classpath element is supported.
defaultTemplateEncoding The default encoding to use for reading templates. Since 1.3 No.
defaultTemplateProfile The default template profile to use when accessing templates. No. [B]
if Object controlling the execution of the task. No.
implementation The identifier of an implementation to process. No. If the implementation, specification and module attributes are not set, all modules will be processed.
indentation The indentation string ('\t' for tab). No.
inputEncoding The encoding to use for reading files. No. Defaults to the system's default encoding.
javaValidationEnabled A flag indicating Java validation is enabled. No. Defaults to true.
lineSeparator The line separator ('\r\n' for DOS, '\r' for Mac, '\n' for Unix). No. Defaults to the system's line separator.
model The public identifier of the model to process. No. Defaults to the JOMC model public id. [C]
modelContextClassName The name of the ModelContext implementation class backing the task. No. [D]
modelObjectClasspathResolutionEnabled A flag indicating model object class path resolution is enabled. No. Defaults to true.
modelProcessingEnabled A flag indicating the processing of models is enabled. No. Defaults to true.
modelResourceValidationEnabled A flag indicating JAXP schema validation of model resources is enabled. No. Defaults to true.
modletLocation The class path location searched for modlets. No. [E]
modletResourceValidationEnabled A flag indicating JAXP schema validation of modlet resources is enabled. No. Defaults to true.
modletSchemaSystemId The http://jomc.org/modlet namespace schema system id. No. [F]
module The identifier of a module to process. No. If the implementation, specification and module attributes are not set, all modules will be processed.
moduleLocation The class path location searched for modules. No. [G]
outputEncoding The encoding to use for writing files. No. Defaults to the system's default encoding.
platformProviderLocation The location searched for platform provider resources. No. [H]
providerLocation The class path location searched for providers. No. [I]
resourceBundleDefaultLanguage The language of the default language properties file of generated resource bundle resource files. No.
resourceFileProcessorClass Class of the ResourceFileProcessor backing the task. No. [K]
resourceProcessingEnabled A flag indicating the processing of resources is enabled. No. Defaults to true.
resourcesDirectory The directory to generate resource files to. Yes.
specification The identifier of a specification to process. No. If the implementation, specification and module attributes are not set, all modules will be processed.
templateEncoding The encoding to use for reading templates. No. As of JOMC 1.3, replaced by attribute defaultTemplateEncoding. This attribute will be removed in JOMC 2.0.
templateLocation Location to search for templates in addition to searching the class path of the task. The value is parsed to an URL first. On successful parsing, that URL is used. Failing that, the value is interpreted as a directory name relative to the project's base directory. If that directory is found, the URL of that directory is used. Otherwise a warning message is logged. No.
templateProfile The template profile to use when accessing templates. No. [B]
transformerLocation The class path location searched for transformers. No. [J]
unless Object controlling the execution of the task. No.

The generate-resources task supports the following nested elements:

Element Description Required
classpath Class path to process. No. Either the classpathRef attribute or the nested classpath element can be used.
locale Locale of the task. Type: LocaleType No.
modelContextAttribute ModelContext attribute to apply. Type: KeyValueType No.
moduleResource Additional module resource. Type: ModuleResourceType No.
templateParameterResource Properties resource holding properties passed to the template engine backing the task. Type: PropertiesResourceType No.
templateParameter Parameter passed to the template engine backing the task. Type: KeyValueType No.
transformationParameterResource Properties resource holding properties to be passed to all transformers of the task. Type: PropertiesResourceType No.
transformationParameter Transformation parameter to be passed to all transformers of the task. Type: KeyValueType No.
transformationOutputProperty Transformation output property to be passed to all transformers of the task. Type: KeyValueType No.
velocityPropertyResource Properties resource holding properties to to be used to configure the Velocity engine backing the task. Type: PropertiesResourceType No.
velocityProperty Property to be used to configure the Velocity engine backing the task. Type: KeyValueType No.

Example: Generating resource files.

<jomc:generate-resources xmlns:jomc="antlib:org.jomc.ant"
      classpathRef="this.module.runtime.classpath"
      module="${this.module.name}"
      resourceBundleDefaultLanguage="en"
      resourcesDirectory="${this.module.classes.dir}"/>

manage-sources

This task manages source code files. [O]

The manage-sources task supports the following attributes:

Attribute Description Required
classpathRef A reference to a class path to process. No. Either the classpathRef attribute or the nested classpath element is supported.
defaultTemplateEncoding The default encoding to use for reading templates. Since 1.3 No.
defaultTemplateProfile The default template profile to use when accessing templates. No. [B]
if Object controlling the execution of the task. No.
implementation The identifier of an implementation to process. No. If the implementation, specification and module attributes are not set, all modules will be processed.
indentation The indentation string ('\t' for tab). No.
inputEncoding The encoding to use for reading files. No. Defaults to the system's default encoding.
javaValidationEnabled A flag indicating Java validation is enabled. No. Defaults to true.
lineSeparator The line separator ('\r\n' for DOS, '\r' for Mac, '\n' for Unix). No. Defaults to the system's line separator.
model The public identifier of the model to process. No. Defaults to the JOMC model public id. [C]
modelContextClassName The name of the ModelContext implementation class backing the task. No. [D]
modelObjectClasspathResolutionEnabled A flag indicating model object class path resolution is enabled. No. Defaults to true.
modelProcessingEnabled A flag indicating the processing of models is enabled. No. Defaults to true.
modelResourceValidationEnabled A flag indicating JAXP schema validation of model resources is enabled. No. Defaults to true.
modletLocation The class path location searched for modlets. No. [E]
modletResourceValidationEnabled A flag indicating JAXP schema validation of modlet resources is enabled. No. Defaults to true.
modletSchemaSystemId The http://jomc.org/modlet namespace schema system id. No. [F]
module The identifier of a module to process. No. If the implementation, specification and module attributes are not set, all modules will be processed.
moduleLocation The class path location searched for modules. No. [G]
outputEncoding The encoding to use for writing files. No. Defaults to the system's default encoding.
platformProviderLocation The location searched for platform provider resources. No. [H]
providerLocation The class path location searched for providers. No. [I]
sourcesDirectory The directory holding the source files to manage. Yes.
sourceFileProcessorClass Class of the SourceFileProcessor backing the task. No. [M]
sourceProcessingEnabled A flag indicating the processing of source files is enabled. No. Defaults to true.
specification The identifier of a specification to process. No. If the implementation, specification and module attributes are not set, all modules will be processed.
templateEncoding The encoding to use for reading templates. No. As of JOMC 1.3, replaced by attribute defaultTemplateEncoding. This attribute will be removed in JOMC 2.0.
templateLocation Location to search for templates in addition to searching the class path of the task. The value is parsed to an URL first. On successful parsing, that URL is used. Failing that, the value is interpreted as a directory name relative to the project's base directory. If that directory is found, the URL of that directory is used. Otherwise a warning message is logged. No.
templateProfile The template profile to use when accessing templates. No. [B]
transformerLocation The class path location searched for transformers. No. [J]
unless Object controlling the execution of the task. No.

The manage-sources task supports the following nested elements:

Element Description Required
classpath Class path to process. No. Either the classpathRef attribute or the nested classpath element can be used.
locale Locale of the task. Type: LocaleType No.
modelContextAttribute ModelContext attribute to apply. Type: KeyValueType No.
moduleResource Additional module resource. Type: ModuleResourceType No.
templateParameterResource Properties resource holding properties passed to the template engine backing the task. Type: PropertiesResourceType No.
templateParameter Parameter passed to the template engine backing the task. Type: KeyValueType No.
transformationParameterResource Properties resource holding properties to be passed to all transformers of the task. Type: PropertiesResourceType No.
transformationParameter Transformation parameter to be passed to all transformers of the task. Type: KeyValueType No.
transformationOutputProperty Transformation output property to be passed to all transformers of the task. Type: KeyValueType No.
velocityPropertyResource Properties resource holding properties to to be used to configure the Velocity engine backing the task. Type: PropertiesResourceType No.
velocityProperty Property to be used to configure the Velocity engine backing the task. Type: KeyValueType No.

Example: Managing source files.

<jomc:manage-sources xmlns:jomc="antlib:org.jomc.ant"
      classpathRef="this.module.runtime.classpath"
      module="${this.module.name}"
      sourcesDirectory="${this.module.src.dir}">

  <jomc:locale language="en"/>
</jomc:manage-sources>

validate-classes

This task validates class file model objects. [P]

The validate-classes task supports the following attributes:

Attribute Description Required
classesDirectory The directory holding the class files to validate model objects of. Yes.
classFileProcessorClass Class of the ClassFileProcessor backing the task. No. [A]
classpathRef A reference to a class path to process. No. Either the classpathRef attribute or the nested classpath element is supported.
classProcessingEnabled A flag indicating the processing of classes is enabled. No. Defaults to true.
defaultTemplateEncoding The default encoding to use for reading templates. Since 1.3 No.
defaultTemplateProfile The default template profile to use when accessing templates. No. [B]
if Object controlling the execution of the task. No.
implementation The identifier of an implementation to process. No. If the implementation, specification and module attributes are not set, all modules will be processed.
inputEncoding The encoding to use for reading files. No. Defaults to the system's default encoding.
javaValidationEnabled A flag indicating Java validation is enabled. No. Defaults to true.
lineSeparator The line separator (' r n' for DOS, ' r' for Mac, ' n' for Unix). No.
model The public identifier of the model to process. No. Defaults to the JOMC model public id. [C]
modelContextClassName The name of the ModelContext implementation class backing the task. No. [D]
modelObjectClasspathResolutionEnabled A flag indicating model object class path resolution is enabled. No. Defaults to true.
modelProcessingEnabled A flag indicating the processing of models is enabled. No. Defaults to true.
modelResourceValidationEnabled A flag indicating JAXP schema validation of model resources is enabled. No. Defaults to true.
modletLocation The class path location searched for modlets. No. [E]
modletResourceValidationEnabled A flag indicating JAXP schema validation of modlet resources is enabled. No. Defaults to true.
modletSchemaSystemId The http://jomc.org/modlet namespace schema system id. No. [F]
module The identifier of a module to process. No. If the implementation, specification and module attributes are not set, all modules will be processed.
moduleLocation The class path location searched for modules. No. [G]
outputEncoding The encoding to use for writing files. No. Defaults to the system's default encoding.
platformProviderLocation The location searched for platform provider resources. No. [H]
providerLocation The class path location searched for providers. No. [I]
specification The identifier of a specification to process. No. If the implementation, specification and module attributes are not set, all modules will be processed.
templateEncoding The encoding to use for reading templates. No. As of JOMC 1.3, replaced by attribute defaultTemplateEncoding. This attribute will be removed in JOMC 2.0.
templateLocation Location to search for templates in addition to searching the class path of the task. The value is parsed to an URL first. On successful parsing, that URL is used. Failing that, the value is interpreted as a directory name relative to the project's base directory. If that directory is found, the URL of that directory is used. Otherwise a warning message is logged. No.
templateProfile The template profile to use when accessing templates. No. [B]
transformerLocation The class path location searched for transformers. No. [J]
unless Object controlling the execution of the task. No.

The validate-classes task supports the following nested elements:

Element Description Required
classpath Class path to process. No. Either the classpathRef attribute or the nested classpath element can be used.
locale Locale of the task. Type: LocaleType No.
modelContextAttribute ModelContext attribute to apply. Type: KeyValueType No.
moduleResource Additional module resource. Type: ModuleResourceType No.
templateParameterResource Properties resource holding properties passed to the template engine backing the task. Type: PropertiesResourceType No.
templateParameter Parameter passed to the template engine backing the task. Type: KeyValueType No.
transformationParameterResource Properties resource holding properties to be passed to all transformers of the task. Type: PropertiesResourceType No.
transformationParameter Transformation parameter to be passed to all transformers of the task. Type: KeyValueType No.
transformationOutputProperty Transformation output property to be passed to all transformers of the task. Type: KeyValueType No.
velocityPropertyResource Properties resource holding properties to to be used to configure the Velocity engine backing the task. Type: PropertiesResourceType No.
velocityProperty Property to be used to configure the Velocity engine backing the task. Type: KeyValueType No.

Example: Validating model objects of class files.

<jomc:validate-classes xmlns:jomc="antlib:org.jomc.ant"
      classpathRef="this.module.runtime.classpath"
      module="${this.module.name}"
      classesDirectory="${this.module.classes.dir}"/>

validate-classpath

This task validates classpath class file model objects. [Q]

The validate-classpath task supports the following attributes:

Attribute Description Required
classFileProcessorClass Class of the ClassFileProcessor backing the task. No. [A]
classpathRef A reference to a class path to process. No. Either the classpathRef attribute or the nested classpath element is supported.
classProcessingEnabled A flag indicating the processing of classes is enabled. No. Defaults to true.
defaultTemplateEncoding The default encoding to use for reading templates. Since 1.3 No.
defaultTemplateProfile The default template profile to use when accessing templates. No. [B]
if Object controlling the execution of the task. No.
implementation The identifier of an implementation to process. No. If the implementation, specification and module attributes are not set, all modules will be processed.
indentation The indentation string ('\t' for tab). No.
inputEncoding The encoding to use for reading files. No. Defaults to the system's default encoding.
javaValidationEnabled A flag indicating Java validation is enabled. No. Defaults to true.
lineSeparator The line separator ('\r\n' for DOS, '\r' for Mac, '\n' for Unix). No. Defaults to the system's line separator.
model The public identifier of the model to process. No. Defaults to the JOMC model public id. [C]
modelContextClassName The name of the ModelContext implementation class backing the task. No. [D]
modelObjectClasspathResolutionEnabled A flag indicating model object class path resolution is enabled. No. Defaults to true.
modelProcessingEnabled A flag indicating the processing of models is enabled. No. Defaults to true.
modelResourceValidationEnabled A flag indicating JAXP schema validation of model resources is enabled. No. Defaults to true.
modletLocation The class path location searched for modlets. No. [E]
modletResourceValidationEnabled A flag indicating JAXP schema validation of modlet resources is enabled. No. Defaults to true.
modletSchemaSystemId The http://jomc.org/modlet namespace schema system id. No. [F]
module The identifier of a module to process. No. If the implementation, specification and module attributes are not set, all modules will be processed.
moduleLocation The class path location searched for modules. No. [G]
outputEncoding The encoding to use for writing files. No. Defaults to the system's default encoding.
platformProviderLocation The location searched for platform provider resources. No. [H]
providerLocation The class path location searched for providers. No. [I]
specification The identifier of a specification to process. No. If the implementation, specification and module attributes are not set, all modules will be processed.
templateEncoding The encoding to use for reading templates. No. As of JOMC 1.3, replaced by attribute defaultTemplateEncoding. This attribute will be removed in JOMC 2.0.
templateLocation Location to search for templates in addition to searching the class path of the task. The value is parsed to an URL first. On successful parsing, that URL is used. Failing that, the value is interpreted as a directory name relative to the project's base directory. If that directory is found, the URL of that directory is used. Otherwise a warning message is logged. No.
templateProfile The template profile to use when accessing templates. No. [B]
transformerLocation The class path location searched for transformers. No. [J]
unless Object controlling the execution of the task. No.

The validate-classpath task supports the following nested elements:

Element Description Required
classpath Class path to process. No. Either the classpathRef attribute or the nested classpath element can be used.
locale Locale of the task. Type: LocaleType No.
modelContextAttribute ModelContext attribute to apply. Type: KeyValueType No.
moduleResource Additional module resource. Type: ModuleResourceType No.
templateParameterResource Properties resource holding properties passed to the template engine backing the task. Type: PropertiesResourceType No.
templateParameter Parameter passed to the template engine backing the task. Type: KeyValueType No.
transformationParameterResource Properties resource holding properties to be passed to all transformers of the task. Type: PropertiesResourceType No.
transformationParameter Transformation parameter to be passed to all transformers of the task. Type: KeyValueType No.
transformationOutputProperty Transformation output property to be passed to all transformers of the task. Type: KeyValueType No.
velocityPropertyResource Properties resource holding properties to to be used to configure the Velocity engine backing the task. Type: PropertiesResourceType No.
velocityProperty Property to be used to configure the Velocity engine backing the task. Type: KeyValueType No.

Example: Validating class file model objects of a class path.

<jomc:validate-classpath xmlns:jomc="antlib:org.jomc.ant"
      classpathRef="this.module.runtime.classpath"/>

validate-model

This task validates models. [R]

The validate-model task supports the following attributes:

Attribute Description Required
classpathRef A reference to a class path to process. No. Either the classpathRef attribute or the nested classpath element is supported.
if Object controlling the execution of the task. No.
javaValidationEnabled A flag indicating Java validation is enabled. No. Defaults to true.
model The public identifier of the model to process. No. Defaults to the JOMC model public id. [C]
modelContextClassName The name of the ModelContext implementation class backing the task. No. [D]
modelObjectClasspathResolutionEnabled A flag indicating model object class path resolution is enabled. No. Defaults to true.
modelProcessingEnabled A flag indicating the processing of models is enabled. No. Defaults to true.
modelResourceValidationEnabled A flag indicating JAXP schema validation of model resources is enabled. No. Defaults to true.
modletLocation The class path location searched for modlets. No. [E]
modletResourceValidationEnabled A flag indicating JAXP schema validation of modlet resources is enabled. No. Defaults to true.
modletSchemaSystemId The http://jomc.org/modlet namespace schema system id. No. [F]
moduleLocation The class path location searched for modules. No. [G]
platformProviderLocation The location searched for platform provider resources. No. [H]
providerLocation The class path location searched for providers. No. [I]
transformerLocation The class path location searched for transformers. No. [J]
unless Object controlling the execution of the task. No.

The validate-model task supports the following nested elements:

Element Description Required
classpath Class path to process. No. Either the classpathRef attribute or the nested classpath element can be used.
modelContextAttribute ModelContext attribute to apply. Type: KeyValueType No.
moduleResource Additional module resource. Type: ModuleResourceType No.
transformationParameterResource Properties resource holding properties to be passed to all transformers of the task. Type: PropertiesResourceType No.
transformationParameter Transformation parameter to be passed to all transformers of the task. Type: KeyValueType No.
transformationOutputProperty Transformation output property to be passed to all transformers of the task. Type: KeyValueType No.

Example: Validating a model.

<jomc:validate-model xmlns:jomc="antlib:org.jomc.ant"
      classpathRef="this.module.runtime.classpath"/>

merge-modlets

This task merges modlet resources. [S]

The merge-modlets task supports the following attributes:

Attribute Description Required
classpathRef A reference to a class path to process. No. Either the classpathRef attribute or the nested classpath element is supported.
if Object controlling the execution of the task. No.
model The public identifier of the model to process. No. Defaults to the JOMC model public id. [C]
modelContextClassName The name of the ModelContext implementation class backing the task. No. [D]
modelProcessingEnabled A flag indicating the processing of models is enabled. No. Defaults to true.
modletEncoding The encoding of the modlet resource. No. Defaults to the system's default encoding.
modletFile The file to write the merged modlet to. Yes.
modletLocation The class path location searched for modlets. No. [E]
modletResourceValidationEnabled A flag indicating JAXP schema validation of modlet resources is enabled. No. Defaults to true.
modletName The name of the merged modlet. Yes.
modletObjectStylesheet The location of a style sheet to transform the merged modlet with. No.
modletSchemaSystemId The http://jomc.org/modlet namespace schema system id. No. [F]
modletVendor The vendor of the merged modlet. No.
modletVersion The version of the merged modlet. No.
platformProviderLocation The location searched for platform provider resources. No. [H]
providerLocation The class path location searched for providers. No. [I]
unless Object controlling the execution of the task. No.

The merge-modlets task supports the following nested elements:

Element Description Required
classpath Class path to process. No. Either the classpathRef attribute or the nested classpath element can be used.
modelContextAttribute ModelContext attribute to apply. Type: KeyValueType No.
modletExclude Modlet to exclude. Type: NameType No.
modletInclude Modlet to include. Type: NameType No.
modletResource Modlet resource to merge. Type: ModletResourceType No.
transformationParameterResource Properties resource holding properties to be passed to all transformers of the task. Type: PropertiesResourceType No.
transformationParameter Transformation parameter to be passed to all transformers of the task. Type: KeyValueType No.
transformationOutputProperty Transformation output property to be passed to all transformers of the task. Type: KeyValueType No.

Example: Merging modlets.

<jomc:merge-modlets xmlns:jomc="antlib:org.jomc.ant"
      classpathRef="this.module.runtime.classpath"
      modletName="${this.module.name}"
      modletVersion="${this.module.version}"
      modletFile="${this.module.classes.dir}/META-INF/jomc-modlet.xml"/>

merge-modules

This task merges module resources. [T]

The merge-modules task supports the following attributes:

Attribute Description Required
classpathRef A reference to a class path to process. No. Either the classpathRef attribute or the nested classpath element is supported.
if Object controlling the execution of the task. No.
model The public identifier of the model to process. No. Defaults to the JOMC model public id. [C]
modelContextClassName The name of the ModelContext implementation class backing the task. No. [D]
modelObjectStylesheet The location of a style sheet to transform the merged module with. No.
modelObjectClasspathResolutionEnabled A flag indicating model object class path resolution is enabled. No. Defaults to true.
modelProcessingEnabled A flag indicating the processing of models is enabled. No. Defaults to true.
modelResourceValidationEnabled A flag indicating JAXP schema validation of model resources is enabled. No. Defaults to true.
modletLocation The class path location searched for modlets. No. [E]
modletResourceValidationEnabled A flag indicating JAXP schema validation of modlet resources is enabled. No. Defaults to true.
modletSchemaSystemId The http://jomc.org/modlet namespace schema system id. No. [F]
moduleEncoding The encoding of the module resource. No. Defaults to the system's default encoding.
moduleFile The file to write the merged module to. Yes.
moduleName The name of the merged module. Yes.
moduleLocation The class path location searched for modules. No. [G]
moduleVersion The version of the merged module. No.
moduleVendor The vendor of the merged module. No.
platformProviderLocation The location searched for platform provider resources. No. [H]
providerLocation The class path location searched for providers. No. [I]
transformerLocation The class path location searched for transformers. No. [J]
unless Object controlling the execution of the task. No.

The merge-modules task supports the following nested elements:

Element Description Required
classpath Class path to process. No. Either the classpathRef attribute or the nested classpath element can be used.
modelContextAttribute ModelContext attribute to apply. Type: KeyValueType No.
moduleExclude Module to exclude. Type: NameType No.
moduleInclude Module to include. Type: NameType No.
moduleResource Module resource to merge. Type: ModuleResourceType No.
transformationParameterResource Properties resource holding properties to be passed to all transformers of the task. Type: PropertiesResourceType No.
transformationParameter Transformation parameter to be passed to all transformers of the task. Type: KeyValueType No.
transformationOutputProperty Transformation output property to be passed to all transformers of the task. Type: KeyValueType No.

Example: Merging modules.

<jomc:merge-modules xmlns:jomc="antlib:org.jomc.ant"
      classpathRef="this.module.runtime.classpath"
      moduleName="${this.module.name}"
      moduleVersion="${this.module.version}"
      moduleFile="${this.module.classes.dir}/META-INF/jomc.xml"/>

write-model

This task writes model objects. [U]

The write-model task supports the following attributes:

Attribute Description Required
classpathRef A reference to a class path to process. No. Either the classpathRef attribute or the nested classpath element is supported.
if Object controlling the execution of the task. No.
implementation The identifier of an implementation to write. No.
instanceModelFile File to write the instance to. Since 1.6 No.
model The public identifier of the model to process. No. Defaults to the JOMC model public id. [C]
modelContextClassName The name of the ModelContext implementation class backing the task. No. [D]
modelEncoding The encoding to use when writing the model. No.
modelFile File to write the model to. No. If no file is set, the model will be logged instead.
modelObjectClasspathResolutionEnabled A flag indicating model object class path resolution is enabled. No. Defaults to true.
modelProcessingEnabled A flag indicating the processing of models is enabled. No. Defaults to true.
modelResourceValidationEnabled A flag indicating JAXP schema validation of model resources is enabled. No. Defaults to true.
modletLocation The class path location searched for modlets. No. [E]
modletResourceValidationEnabled A flag indicating JAXP schema validation of modlet resources is enabled. No. Defaults to true.
modletSchemaSystemId The http://jomc.org/modlet namespace schema system id. No. [F]
module The name of a module to write. No.
moduleLocation The class path location searched for modules. No. [G]
moduleModelFile File to write the module to. Since 1.6 No.
platformProviderLocation The location searched for platform provider resources. No. [H]
providerLocation The class path location searched for providers. No. [I]
specification The identifier of a specification to write. No.
specificationModelFile File to write the specification to. Since 1.6 No.
transformerLocation The class path location searched for transformers. No. [J]
unless Object controlling the execution of the task. No.

The write-model task supports the following nested elements:

Element Description Required
classpath Class path to process. No. Either the classpathRef attribute or the nested classpath element can be used.
modelContextAttribute ModelContext attribute to apply. Type: KeyValueType No.
moduleResource Additional module resource. Type: ModuleResourceType No.
transformationParameterResource Properties resource holding properties to be passed to all transformers of the task. Type: PropertiesResourceType No.
transformationParameter Transformation parameter to be passed to all transformers of the task. Type: KeyValueType No.
transformationOutputProperty Transformation output property to be passed to all transformers of the task. Type: KeyValueType No.

Example: Writing a model.

<jomc:write-model xmlns:jomc="antlib:org.jomc.ant"
      classpathRef="this.module.runtime.classpath"/>

NameType

The NameType is used to specify names.

The NameType type supports the following attributes:

Attribute Description Required
name The name. Yes.

KeyValueType

The KeyValueType is used to specify a key value pair.

The KeyValueType type supports the following attributes:

Attribute Description Required
key The key. Yes.
value The value. No. If both, the value attribute and the type attribute are not set, the key is mapped to the null reference.
type The name of the class of the type's object. No. If not set, depending on the value attribute, the key is either mapped to the null reference, if the value attribute is not set, or to the value the value attribute is set to. If set, depending on the value attribute, the key is either mapped to an object created using the public no-arg constructor of the given class, if the value attribute is not set, or is mapped to an object created by invoking either the public constructor of the given class taking a single string argument or the static valueOf method of the given class taking a single string argument passing the value the value attribute is set to.

Examples

Element Mapping
<element key="The Key"/> "The Key" => null
<element key="The Key" value="The Value"/> "The Key" => "The Value"
<element key="The Key" type="pkg.Class"/> "The Key" => new pkg.Class();
<element key="The Key" value="The Value" type="pkg.Class"/> 1. "The Key" => new pkg.Class( "The Value" ); 2. "The Key" => pkg.Class.valueOf( "The Value" );

LocaleType

The LocaleType is used to specify a locale.

The LocaleType type supports the following attributes:

Attribute Description Required
language Lowercase two-letter ISO-639 code. No.
country Uppercase two-letter ISO-3166 code. No.
variant Vendor and browser specific code. See description of class java.util.Locale. No.

ResourceType

The ResourceType is used to specify resources.

The ResourceType type supports the following attributes:

Attribute Description Required
location Location of the resource. The location value is used to first search the class path of the task. If a class path resource is found, that resource is used. If no class path resource is found, an attempt is made to parse the location value to an URL. On successful parsing, that URL is used. Otherwise the location value is interpreted as a file name relative to the base directory of the project. If that file exists, that file is used. If nothing is found at the given location, depending on the optional flag, a warning message is logged or a build failure is produced. Yes.
optional The optional flag is used to flag the resource optional. When an optional resource is not found, a warning message is logged instead of producing a build failure. No. Defaults to false.
connectTimeout Timeout value, in milliseconds, to be used when establishing communications links to the resource. No. Defaults to 60000.
readTimeout Timeout value, in milliseconds, to be used when reading the resource. No. Defaults to 60000.

ModletResourceType

The ModletResourceType is used to specify modlet resources.

The ModletResourceType type supports the following attributes:

Attribute Description Required
location Location of the resource. The location value is used to first search the class path of the task. If class path resources are found, those resources are used. If no class path resources are found, an attempt is made to parse the location value to an URL. On successful parsing, that URL is used. Otherwise the location value is interpreted as a file name relative to the base directory of the project. If that file exists, that file is used. If nothing is found at the given location, depending on the optional flag, a warning message is logged or a build failure is produced. Yes.
optional The optional flag is used to flag the resource optional. When an optional resource is not found, a warning message is logged instead of producing a build failure. No. Defaults to false.
connectTimeout Timeout value, in milliseconds, to be used when establishing communications links to the resource. No. Defaults to 60000.
readTimeout Timeout value, in milliseconds, to be used when reading the resource. No. Defaults to 60000.

ModuleResourceType

The ModuleResourceType is used to specify module resources.

The ModuleResourceType type supports the following attributes:

Attribute Description Required
location Location of the resource. The location value is used to first search the class path of the task. If class path resources are found, those resources are used. If no class path resources are found, an attempt is made to parse the location value to an URL. On successful parsing, that URL is used. Otherwise the location value is interpreted as a file name relative to the base directory of the project. If that file exists, that file is used. If nothing is found at the given location, depending on the optional flag, a warning message is logged or a build failure is produced. Yes.
optional The optional flag is used to flag the resource optional. When an optional resource is not found, a warning message is logged instead of producing a build failure. No. Defaults to false.
connectTimeout Timeout value, in milliseconds, to be used when establishing communications links to the resource. No. Defaults to 60000.
readTimeout Timeout value, in milliseconds, to be used when reading the resource. No. Defaults to 60000.

PropertiesResourceType

The PropertiesResourceType is used to specify properties resources.

The PropertiesResourceType type supports the following attributes:

Attribute Description Required
location Location of the resource. The location value is used to first search the class path of the task. If a class path resource is found, that resource is used. If no class path resource is found, an attempt is made to parse the location value to an URL. On successful parsing, that URL is used. Otherwise the location value is interpreted as a file name relative to the base directory of the project. If that file exists, that file is used. If nothing is found at the given location, depending on the optional flag, a warning message is logged or a build failure is produced. Yes.
optional The optional flag is used to flag the resource optional. When an optional resource is not found, a warning message is logged instead of producing a build failure. No. Defaults to false.
connectTimeout Timeout value, in milliseconds, to be used when establishing communications links to the resource. No. Defaults to 60000.
readTimeout Timeout value, in milliseconds, to be used when reading the resource. No. Defaults to 60000.
format Format of the properties resource. No. Either plain or xml. Defaults to plain.

TransformerResourceType

The TransformerResourceType is used to specify XSLT document resources.

The TransformerResourceType type supports the following attributes:

Attribute Description Required
location Location of the resource. The location value is used to first search the class path of the task. If a class path resource is found, that resource is used. If no class path resource is found, an attempt is made to parse the location value to an URL. On successful parsing, that URL is used. Otherwise the location value is interpreted as a file name relative to the base directory of the project. If that file exists, that file is used. If nothing is found at the given location, depending on the optional flag, a warning message is logged or a build failure is produced. Yes.
optional The optional flag is used to flag the resource optional. When an optional resource is not found, a warning message is logged instead of producing a build failure. No. Defaults to false.
connectTimeout Timeout value, in milliseconds, to be used when establishing communications links to the resource. No. Defaults to 60000.
readTimeout Timeout value, in milliseconds, to be used when reading the resource. No. Defaults to 60000.

The TransformerResourceType supports the following nested elements:

Element Description Required
transformationParameterResource Properties resource holding transformation parameters to apply. Type: PropertiesResourceType No.
transformationParameter Transformation parameter to apply. Type: KeyValueType No.
transformationOutputProperty Transformation output property to apply. Type: KeyValueType No.