Task and Type Reference

commit-classes

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

The commit-classes task supports the following attributes:

AttributeDescriptionRequired
classesDirectoryThe directory holding the class files to commit model objects to.Yes.
classFileProcessorClassClass of the ClassFileProcessor backing the task.No. [A]
classpathRefA reference to a class path to process.No. Either the classpathRef attribute or the nested classpath element is supported.
classProcessingEnabledA flag indicating the processing of classes is enabled.No. Defaults to true.
defaultTemplateEncodingThe default encoding to use for reading templates. Since 1.3No.
defaultTemplateProfileThe default template profile to use when accessing templates.No. [B]
ifObject controlling the execution of the task.No.
implementationThe identifier of an implementation to process.No. If the implementation, specification and module attributes are not set, all modules will be processed.
indentationThe indentation string ('\t' for tab).No.
inputEncodingThe encoding to use for reading files.No. Defaults to the system's default encoding.
javaValidationEnabledA flag indicating Java validation is enabled.No. Defaults to true.
lineSeparatorThe line separator ('\r\n' for DOS, '\r' for Mac, '\n' for Unix).No. Defaults to the system's line separator.
modelThe public identifier of the model to process.No. Defaults to the JOMC model public id. [C]
modelContextClassNameThe name of the ModelContext implementation class backing the task.No. [D]
modelObjectClasspathResolutionEnabledA flag indicating model object class path resolution is enabled.No. Defaults to true.
modelProcessingEnabledA flag indicating the processing of models is enabled.No. Defaults to true.
modelResourceValidationEnabledA flag indicating JAXP schema validation of model resources is enabled.No. Defaults to true.
modletLocationThe class path location searched for modlets.No. [E]
modletResourceValidationEnabledA flag indicating JAXP schema validation of modlet resources is enabled.No. Defaults to true.
modletSchemaSystemIdThe http://jomc.org/modlet namespace schema system id.No. [F]
moduleThe identifier of a module to process.No. If the implementation, specification and module attributes are not set, all modules will be processed.
moduleLocationThe class path location searched for modules.No. [G]
outputEncodingThe encoding to use for writing files.No. Defaults to the system's default encoding.
platformProviderLocationThe location searched for platform provider resources.No. [H]
providerLocationThe class path location searched for providers.No. [I]
specificationThe identifier of a specification to process.No. If the implementation, specification and module attributes are not set, all modules will be processed.
templateEncodingThe 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.
templateLocationLocation 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.
templateProfileThe template profile to use when accessing templates.No. [B]
transformerLocationThe class path location searched for transformers.No. [J]
unlessObject controlling the execution of the task.No.

The commit-classes task supports the following nested elements:

ElementDescriptionRequired
classpathClass path to process.No. Either the classpathRef attribute or the nested classpath element can be used.
localeLocale of the task. Type: LocaleTypeNo.
modelContextAttributeModelContext attribute to apply. Type: KeyValueTypeNo.
modelObjectStylesheetResourceXSLT document to use for transforming model objects. Type: TransformerResourceTypeNo.
moduleResourceAdditional module resource. Type: ModuleResourceTypeNo.
templateParameterResourceProperties resource holding properties passed to the template engine backing the task. Type: PropertiesResourceTypeNo.
templateParameterParameter passed to the template engine backing the task. Type: KeyValueTypeNo.
transformationParameterResourceProperties resource holding properties to be passed to all transformers of the task. Type: PropertiesResourceTypeNo.
transformationParameterTransformation parameter to be passed to all transformers of the task. Type: KeyValueTypeNo.
transformationOutputPropertyTransformation output property to be passed to all transformers of the task. Type: KeyValueTypeNo.
velocityPropertyResourceProperties resource holding properties to to be used to configure the Velocity engine backing the task. Type: PropertiesResourceTypeNo.
velocityPropertyProperty to be used to configure the Velocity engine backing the task. Type: KeyValueTypeNo.

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:

AttributeDescriptionRequired
classpathRefA reference to a class path to process.No. Either the classpathRef attribute or the nested classpath element is supported.
defaultTemplateEncodingThe default encoding to use for reading templates. Since 1.3No.
defaultTemplateProfileThe default template profile to use when accessing templates.No. [B]
ifObject controlling the execution of the task.No.
implementationThe identifier of an implementation to process.No. If the implementation, specification and module attributes are not set, all modules will be processed.
indentationThe indentation string ('\t' for tab).No.
inputEncodingThe encoding to use for reading files.No. Defaults to the system's default encoding.
javaValidationEnabledA flag indicating Java validation is enabled.No. Defaults to true.
lineSeparatorThe line separator ('\r\n' for DOS, '\r' for Mac, '\n' for Unix).No. Defaults to the system's line separator.
modelThe public identifier of the model to process.No. Defaults to the JOMC model public id. [C]
modelContextClassNameThe name of the ModelContext implementation class backing the task.No. [D]
modelObjectClasspathResolutionEnabledA flag indicating model object class path resolution is enabled.No. Defaults to true.
modelProcessingEnabledA flag indicating the processing of models is enabled.No. Defaults to true.
modelResourceValidationEnabledA flag indicating JAXP schema validation of model resources is enabled.No. Defaults to true.
modletLocationThe class path location searched for modlets.No. [E]
modletResourceValidationEnabledA flag indicating JAXP schema validation of modlet resources is enabled.No. Defaults to true.
modletSchemaSystemIdThe http://jomc.org/modlet namespace schema system id.No. [F]
moduleThe identifier of a module to process.No. If the implementation, specification and module attributes are not set, all modules will be processed.
moduleLocationThe class path location searched for modules.No. [G]
outputEncodingThe encoding to use for writing files.No. Defaults to the system's default encoding.
platformProviderLocationThe location searched for platform provider resources.No. [H]
providerLocationThe class path location searched for providers.No. [I]
resourceBundleDefaultLanguageThe language of the default language properties file of generated resource bundle resource files.No.
resourceFileProcessorClassClass of the ResourceFileProcessor backing the task.No. [K]
resourceProcessingEnabledA flag indicating the processing of resources is enabled.No. Defaults to true.
resourcesDirectoryThe directory to generate resource files to.Yes.
specificationThe identifier of a specification to process.No. If the implementation, specification and module attributes are not set, all modules will be processed.
templateEncodingThe 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.
templateLocationLocation 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.
templateProfileThe template profile to use when accessing templates.No. [B]
transformerLocationThe class path location searched for transformers.No. [J]
unlessObject controlling the execution of the task.No.

The generate-resources task supports the following nested elements:

ElementDescriptionRequired
classpathClass path to process.No. Either the classpathRef attribute or the nested classpath element can be used.
localeLocale of the task. Type: LocaleTypeNo.
modelContextAttributeModelContext attribute to apply. Type: KeyValueTypeNo.
moduleResourceAdditional module resource. Type: ModuleResourceTypeNo.
templateParameterResourceProperties resource holding properties passed to the template engine backing the task. Type: PropertiesResourceTypeNo.
templateParameterParameter passed to the template engine backing the task. Type: KeyValueTypeNo.
transformationParameterResourceProperties resource holding properties to be passed to all transformers of the task. Type: PropertiesResourceTypeNo.
transformationParameterTransformation parameter to be passed to all transformers of the task. Type: KeyValueTypeNo.
transformationOutputPropertyTransformation output property to be passed to all transformers of the task. Type: KeyValueTypeNo.
velocityPropertyResourceProperties resource holding properties to to be used to configure the Velocity engine backing the task. Type: PropertiesResourceTypeNo.
velocityPropertyProperty to be used to configure the Velocity engine backing the task. Type: KeyValueTypeNo.

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:

AttributeDescriptionRequired
classpathRefA reference to a class path to process.No. Either the classpathRef attribute or the nested classpath element is supported.
defaultTemplateEncodingThe default encoding to use for reading templates. Since 1.3No.
defaultTemplateProfileThe default template profile to use when accessing templates.No. [B]
ifObject controlling the execution of the task.No.
implementationThe identifier of an implementation to process.No. If the implementation, specification and module attributes are not set, all modules will be processed.
indentationThe indentation string ('\t' for tab).No.
inputEncodingThe encoding to use for reading files.No. Defaults to the system's default encoding.
javaValidationEnabledA flag indicating Java validation is enabled.No. Defaults to true.
lineSeparatorThe line separator ('\r\n' for DOS, '\r' for Mac, '\n' for Unix).No. Defaults to the system's line separator.
modelThe public identifier of the model to process.No. Defaults to the JOMC model public id. [C]
modelContextClassNameThe name of the ModelContext implementation class backing the task.No. [D]
modelObjectClasspathResolutionEnabledA flag indicating model object class path resolution is enabled.No. Defaults to true.
modelProcessingEnabledA flag indicating the processing of models is enabled.No. Defaults to true.
modelResourceValidationEnabledA flag indicating JAXP schema validation of model resources is enabled.No. Defaults to true.
modletLocationThe class path location searched for modlets.No. [E]
modletResourceValidationEnabledA flag indicating JAXP schema validation of modlet resources is enabled.No. Defaults to true.
modletSchemaSystemIdThe http://jomc.org/modlet namespace schema system id.No. [F]
moduleThe identifier of a module to process.No. If the implementation, specification and module attributes are not set, all modules will be processed.
moduleLocationThe class path location searched for modules.No. [G]
outputEncodingThe encoding to use for writing files.No. Defaults to the system's default encoding.
platformProviderLocationThe location searched for platform provider resources.No. [H]
providerLocationThe class path location searched for providers.No. [I]
sourcesDirectoryThe directory holding the source files to manage.Yes.
sourceFileProcessorClassClass of the SourceFileProcessor backing the task.No. [M]
sourceProcessingEnabledA flag indicating the processing of source files is enabled.No. Defaults to true.
specificationThe identifier of a specification to process.No. If the implementation, specification and module attributes are not set, all modules will be processed.
templateEncodingThe 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.
templateLocationLocation 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.
templateProfileThe template profile to use when accessing templates.No. [B]
transformerLocationThe class path location searched for transformers.No. [J]
unlessObject controlling the execution of the task.No.

The manage-sources task supports the following nested elements:

ElementDescriptionRequired
classpathClass path to process.No. Either the classpathRef attribute or the nested classpath element can be used.
localeLocale of the task. Type: LocaleTypeNo.
modelContextAttributeModelContext attribute to apply. Type: KeyValueTypeNo.
moduleResourceAdditional module resource. Type: ModuleResourceTypeNo.
templateParameterResourceProperties resource holding properties passed to the template engine backing the task. Type: PropertiesResourceTypeNo.
templateParameterParameter passed to the template engine backing the task. Type: KeyValueTypeNo.
transformationParameterResourceProperties resource holding properties to be passed to all transformers of the task. Type: PropertiesResourceTypeNo.
transformationParameterTransformation parameter to be passed to all transformers of the task. Type: KeyValueTypeNo.
transformationOutputPropertyTransformation output property to be passed to all transformers of the task. Type: KeyValueTypeNo.
velocityPropertyResourceProperties resource holding properties to to be used to configure the Velocity engine backing the task. Type: PropertiesResourceTypeNo.
velocityPropertyProperty to be used to configure the Velocity engine backing the task. Type: KeyValueTypeNo.

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:

AttributeDescriptionRequired
classesDirectoryThe directory holding the class files to validate model objects of.Yes.
classFileProcessorClassClass of the ClassFileProcessor backing the task.No. [A]
classpathRefA reference to a class path to process.No. Either the classpathRef attribute or the nested classpath element is supported.
classProcessingEnabledA flag indicating the processing of classes is enabled.No. Defaults to true.
defaultTemplateEncodingThe default encoding to use for reading templates. Since 1.3No.
defaultTemplateProfileThe default template profile to use when accessing templates.No. [B]
ifObject controlling the execution of the task.No.
implementationThe identifier of an implementation to process.No. If the implementation, specification and module attributes are not set, all modules will be processed.
inputEncodingThe encoding to use for reading files.No. Defaults to the system's default encoding.
javaValidationEnabledA flag indicating Java validation is enabled.No. Defaults to true.
lineSeparatorThe line separator (' r n' for DOS, ' r' for Mac, ' n' for Unix).No.
modelThe public identifier of the model to process.No. Defaults to the JOMC model public id. [C]
modelContextClassNameThe name of the ModelContext implementation class backing the task.No. [D]
modelObjectClasspathResolutionEnabledA flag indicating model object class path resolution is enabled.No. Defaults to true.
modelProcessingEnabledA flag indicating the processing of models is enabled.No. Defaults to true.
modelResourceValidationEnabledA flag indicating JAXP schema validation of model resources is enabled.No. Defaults to true.
modletLocationThe class path location searched for modlets.No. [E]
modletResourceValidationEnabledA flag indicating JAXP schema validation of modlet resources is enabled.No. Defaults to true.
modletSchemaSystemIdThe http://jomc.org/modlet namespace schema system id.No. [F]
moduleThe identifier of a module to process.No. If the implementation, specification and module attributes are not set, all modules will be processed.
moduleLocationThe class path location searched for modules.No. [G]
outputEncodingThe encoding to use for writing files.No. Defaults to the system's default encoding.
platformProviderLocationThe location searched for platform provider resources.No. [H]
providerLocationThe class path location searched for providers.No. [I]
specificationThe identifier of a specification to process.No. If the implementation, specification and module attributes are not set, all modules will be processed.
templateEncodingThe 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.
templateLocationLocation 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.
templateProfileThe template profile to use when accessing templates.No. [B]
transformerLocationThe class path location searched for transformers.No. [J]
unlessObject controlling the execution of the task.No.

The validate-classes task supports the following nested elements:

ElementDescriptionRequired
classpathClass path to process.No. Either the classpathRef attribute or the nested classpath element can be used.
localeLocale of the task. Type: LocaleTypeNo.
modelContextAttributeModelContext attribute to apply. Type: KeyValueTypeNo.
moduleResourceAdditional module resource. Type: ModuleResourceTypeNo.
templateParameterResourceProperties resource holding properties passed to the template engine backing the task. Type: PropertiesResourceTypeNo.
templateParameterParameter passed to the template engine backing the task. Type: KeyValueTypeNo.
transformationParameterResourceProperties resource holding properties to be passed to all transformers of the task. Type: PropertiesResourceTypeNo.
transformationParameterTransformation parameter to be passed to all transformers of the task. Type: KeyValueTypeNo.
transformationOutputPropertyTransformation output property to be passed to all transformers of the task. Type: KeyValueTypeNo.
velocityPropertyResourceProperties resource holding properties to to be used to configure the Velocity engine backing the task. Type: PropertiesResourceTypeNo.
velocityPropertyProperty to be used to configure the Velocity engine backing the task. Type: KeyValueTypeNo.

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:

AttributeDescriptionRequired
classFileProcessorClassClass of the ClassFileProcessor backing the task.No. [A]
classpathRefA reference to a class path to process.No. Either the classpathRef attribute or the nested classpath element is supported.
classProcessingEnabledA flag indicating the processing of classes is enabled.No. Defaults to true.
defaultTemplateEncodingThe default encoding to use for reading templates. Since 1.3No.
defaultTemplateProfileThe default template profile to use when accessing templates.No. [B]
ifObject controlling the execution of the task.No.
implementationThe identifier of an implementation to process.No. If the implementation, specification and module attributes are not set, all modules will be processed.
indentationThe indentation string ('\t' for tab).No.
inputEncodingThe encoding to use for reading files.No. Defaults to the system's default encoding.
javaValidationEnabledA flag indicating Java validation is enabled.No. Defaults to true.
lineSeparatorThe line separator ('\r\n' for DOS, '\r' for Mac, '\n' for Unix).No. Defaults to the system's line separator.
modelThe public identifier of the model to process.No. Defaults to the JOMC model public id. [C]
modelContextClassNameThe name of the ModelContext implementation class backing the task.No. [D]
modelObjectClasspathResolutionEnabledA flag indicating model object class path resolution is enabled.No. Defaults to true.
modelProcessingEnabledA flag indicating the processing of models is enabled.No. Defaults to true.
modelResourceValidationEnabledA flag indicating JAXP schema validation of model resources is enabled.No. Defaults to true.
modletLocationThe class path location searched for modlets.No. [E]
modletResourceValidationEnabledA flag indicating JAXP schema validation of modlet resources is enabled.No. Defaults to true.
modletSchemaSystemIdThe http://jomc.org/modlet namespace schema system id.No. [F]
moduleThe identifier of a module to process.No. If the implementation, specification and module attributes are not set, all modules will be processed.
moduleLocationThe class path location searched for modules.No. [G]
outputEncodingThe encoding to use for writing files.No. Defaults to the system's default encoding.
platformProviderLocationThe location searched for platform provider resources.No. [H]
providerLocationThe class path location searched for providers.No. [I]
specificationThe identifier of a specification to process.No. If the implementation, specification and module attributes are not set, all modules will be processed.
templateEncodingThe 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.
templateLocationLocation 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.
templateProfileThe template profile to use when accessing templates.No. [B]
transformerLocationThe class path location searched for transformers.No. [J]
unlessObject controlling the execution of the task.No.

The validate-classpath task supports the following nested elements:

ElementDescriptionRequired
classpathClass path to process.No. Either the classpathRef attribute or the nested classpath element can be used.
localeLocale of the task. Type: LocaleTypeNo.
modelContextAttributeModelContext attribute to apply. Type: KeyValueTypeNo.
moduleResourceAdditional module resource. Type: ModuleResourceTypeNo.
templateParameterResourceProperties resource holding properties passed to the template engine backing the task. Type: PropertiesResourceTypeNo.
templateParameterParameter passed to the template engine backing the task. Type: KeyValueTypeNo.
transformationParameterResourceProperties resource holding properties to be passed to all transformers of the task. Type: PropertiesResourceTypeNo.
transformationParameterTransformation parameter to be passed to all transformers of the task. Type: KeyValueTypeNo.
transformationOutputPropertyTransformation output property to be passed to all transformers of the task. Type: KeyValueTypeNo.
velocityPropertyResourceProperties resource holding properties to to be used to configure the Velocity engine backing the task. Type: PropertiesResourceTypeNo.
velocityPropertyProperty to be used to configure the Velocity engine backing the task. Type: KeyValueTypeNo.

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:

AttributeDescriptionRequired
classpathRefA reference to a class path to process.No. Either the classpathRef attribute or the nested classpath element is supported.
ifObject controlling the execution of the task.No.
javaValidationEnabledA flag indicating Java validation is enabled.No. Defaults to true.
modelThe public identifier of the model to process.No. Defaults to the JOMC model public id. [C]
modelContextClassNameThe name of the ModelContext implementation class backing the task.No. [D]
modelObjectClasspathResolutionEnabledA flag indicating model object class path resolution is enabled.No. Defaults to true.
modelProcessingEnabledA flag indicating the processing of models is enabled.No. Defaults to true.
modelResourceValidationEnabledA flag indicating JAXP schema validation of model resources is enabled.No. Defaults to true.
modletLocationThe class path location searched for modlets.No. [E]
modletResourceValidationEnabledA flag indicating JAXP schema validation of modlet resources is enabled.No. Defaults to true.
modletSchemaSystemIdThe http://jomc.org/modlet namespace schema system id.No. [F]
moduleLocationThe class path location searched for modules.No. [G]
platformProviderLocationThe location searched for platform provider resources.No. [H]
providerLocationThe class path location searched for providers.No. [I]
transformerLocationThe class path location searched for transformers.No. [J]
unlessObject controlling the execution of the task.No.

The validate-model task supports the following nested elements:

ElementDescriptionRequired
classpathClass path to process.No. Either the classpathRef attribute or the nested classpath element can be used.
modelContextAttributeModelContext attribute to apply. Type: KeyValueTypeNo.
moduleResourceAdditional module resource. Type: ModuleResourceTypeNo.
transformationParameterResourceProperties resource holding properties to be passed to all transformers of the task. Type: PropertiesResourceTypeNo.
transformationParameterTransformation parameter to be passed to all transformers of the task. Type: KeyValueTypeNo.
transformationOutputPropertyTransformation output property to be passed to all transformers of the task. Type: KeyValueTypeNo.

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:

AttributeDescriptionRequired
classpathRefA reference to a class path to process.No. Either the classpathRef attribute or the nested classpath element is supported.
ifObject controlling the execution of the task.No.
modelThe public identifier of the model to process.No. Defaults to the JOMC model public id. [C]
modelContextClassNameThe name of the ModelContext implementation class backing the task.No. [D]
modelProcessingEnabledA flag indicating the processing of models is enabled.No. Defaults to true.
modletEncodingThe encoding of the modlet resource.No. Defaults to the system's default encoding.
modletFileThe file to write the merged modlet to.Yes.
modletLocationThe class path location searched for modlets.No. [E]
modletResourceValidationEnabledA flag indicating JAXP schema validation of modlet resources is enabled.No. Defaults to true.
modletNameThe name of the merged modlet.Yes.
modletObjectStylesheetThe location of a style sheet to transform the merged modlet with.No.
modletSchemaSystemIdThe http://jomc.org/modlet namespace schema system id.No. [F]
modletVendorThe vendor of the merged modlet.No.
modletVersionThe version of the merged modlet.No.
platformProviderLocationThe location searched for platform provider resources.No. [H]
providerLocationThe class path location searched for providers.No. [I]
unlessObject controlling the execution of the task.No.

The merge-modlets task supports the following nested elements:

ElementDescriptionRequired
classpathClass path to process.No. Either the classpathRef attribute or the nested classpath element can be used.
modelContextAttributeModelContext attribute to apply. Type: KeyValueTypeNo.
modletExcludeModlet to exclude. Type: NameTypeNo.
modletIncludeModlet to include. Type: NameTypeNo.
modletResourceModlet resource to merge. Type: ModletResourceTypeNo.
transformationParameterResourceProperties resource holding properties to be passed to all transformers of the task. Type: PropertiesResourceTypeNo.
transformationParameterTransformation parameter to be passed to all transformers of the task. Type: KeyValueTypeNo.
transformationOutputPropertyTransformation output property to be passed to all transformers of the task. Type: KeyValueTypeNo.

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:

AttributeDescriptionRequired
classpathRefA reference to a class path to process.No. Either the classpathRef attribute or the nested classpath element is supported.
ifObject controlling the execution of the task.No.
modelThe public identifier of the model to process.No. Defaults to the JOMC model public id. [C]
modelContextClassNameThe name of the ModelContext implementation class backing the task.No. [D]
modelObjectStylesheetThe location of a style sheet to transform the merged module with.No.
modelObjectClasspathResolutionEnabledA flag indicating model object class path resolution is enabled.No. Defaults to true.
modelProcessingEnabledA flag indicating the processing of models is enabled.No. Defaults to true.
modelResourceValidationEnabledA flag indicating JAXP schema validation of model resources is enabled.No. Defaults to true.
modletLocationThe class path location searched for modlets.No. [E]
modletResourceValidationEnabledA flag indicating JAXP schema validation of modlet resources is enabled.No. Defaults to true.
modletSchemaSystemIdThe http://jomc.org/modlet namespace schema system id.No. [F]
moduleEncodingThe encoding of the module resource.No. Defaults to the system's default encoding.
moduleFileThe file to write the merged module to.Yes.
moduleNameThe name of the merged module.Yes.
moduleLocationThe class path location searched for modules.No. [G]
moduleVersionThe version of the merged module.No.
moduleVendorThe vendor of the merged module.No.
platformProviderLocationThe location searched for platform provider resources.No. [H]
providerLocationThe class path location searched for providers.No. [I]
transformerLocationThe class path location searched for transformers.No. [J]
unlessObject controlling the execution of the task.No.

The merge-modules task supports the following nested elements:

ElementDescriptionRequired
classpathClass path to process.No. Either the classpathRef attribute or the nested classpath element can be used.
modelContextAttributeModelContext attribute to apply. Type: KeyValueTypeNo.
moduleExcludeModule to exclude. Type: NameTypeNo.
moduleIncludeModule to include. Type: NameTypeNo.
moduleResourceModule resource to merge. Type: ModuleResourceTypeNo.
transformationParameterResourceProperties resource holding properties to be passed to all transformers of the task. Type: PropertiesResourceTypeNo.
transformationParameterTransformation parameter to be passed to all transformers of the task. Type: KeyValueTypeNo.
transformationOutputPropertyTransformation output property to be passed to all transformers of the task. Type: KeyValueTypeNo.

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:

AttributeDescriptionRequired
classpathRefA reference to a class path to process.No. Either the classpathRef attribute or the nested classpath element is supported.
ifObject controlling the execution of the task.No.
implementationThe identifier of an implementation to write.No.
instanceModelFileFile to write the instance to. Since 1.6No.
modelThe public identifier of the model to process.No. Defaults to the JOMC model public id. [C]
modelContextClassNameThe name of the ModelContext implementation class backing the task.No. [D]
modelEncodingThe encoding to use when writing the model.No.
modelFileFile to write the model to.No. If no file is set, the model will be logged instead.
modelObjectClasspathResolutionEnabledA flag indicating model object class path resolution is enabled.No. Defaults to true.
modelProcessingEnabledA flag indicating the processing of models is enabled.No. Defaults to true.
modelResourceValidationEnabledA flag indicating JAXP schema validation of model resources is enabled.No. Defaults to true.
modletLocationThe class path location searched for modlets.No. [E]
modletResourceValidationEnabledA flag indicating JAXP schema validation of modlet resources is enabled.No. Defaults to true.
modletSchemaSystemIdThe http://jomc.org/modlet namespace schema system id.No. [F]
moduleThe name of a module to write.No.
moduleLocationThe class path location searched for modules.No. [G]
moduleModelFileFile to write the module to. Since 1.6No.
platformProviderLocationThe location searched for platform provider resources.No. [H]
providerLocationThe class path location searched for providers.No. [I]
specificationThe identifier of a specification to write.No.
specificationModelFileFile to write the specification to. Since 1.6No.
transformerLocationThe class path location searched for transformers.No. [J]
unlessObject controlling the execution of the task.No.

The write-model task supports the following nested elements:

ElementDescriptionRequired
classpathClass path to process.No. Either the classpathRef attribute or the nested classpath element can be used.
modelContextAttributeModelContext attribute to apply. Type: KeyValueTypeNo.
moduleResourceAdditional module resource. Type: ModuleResourceTypeNo.
transformationParameterResourceProperties resource holding properties to be passed to all transformers of the task. Type: PropertiesResourceTypeNo.
transformationParameterTransformation parameter to be passed to all transformers of the task. Type: KeyValueTypeNo.
transformationOutputPropertyTransformation output property to be passed to all transformers of the task. Type: KeyValueTypeNo.

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:

AttributeDescriptionRequired
nameThe name.Yes.

KeyValueType

The KeyValueType is used to specify a key value pair.

The KeyValueType type supports the following attributes:

AttributeDescriptionRequired
keyThe key.Yes.
valueThe value.No. If both, the value attribute and the type attribute are not set, the key is mapped to the null reference.
typeThe 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

ElementMapping
<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:

AttributeDescriptionRequired
languageLowercase two-letter ISO-639 code.No.
countryUppercase two-letter ISO-3166 code.No.
variantVendor 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:

AttributeDescriptionRequired
locationLocation 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.
optionalThe 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.
connectTimeoutTimeout value, in milliseconds, to be used when establishing communications links to the resource.No. Defaults to 60000.
readTimeoutTimeout 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:

AttributeDescriptionRequired
locationLocation 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.
optionalThe 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.
connectTimeoutTimeout value, in milliseconds, to be used when establishing communications links to the resource.No. Defaults to 60000.
readTimeoutTimeout 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:

AttributeDescriptionRequired
locationLocation 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.
optionalThe 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.
connectTimeoutTimeout value, in milliseconds, to be used when establishing communications links to the resource.No. Defaults to 60000.
readTimeoutTimeout 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:

AttributeDescriptionRequired
locationLocation 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.
optionalThe 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.
connectTimeoutTimeout value, in milliseconds, to be used when establishing communications links to the resource.No. Defaults to 60000.
readTimeoutTimeout value, in milliseconds, to be used when reading the resource.No. Defaults to 60000.
formatFormat 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:

AttributeDescriptionRequired
locationLocation 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.
optionalThe 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.
connectTimeoutTimeout value, in milliseconds, to be used when establishing communications links to the resource.No. Defaults to 60000.
readTimeoutTimeout value, in milliseconds, to be used when reading the resource.No. Defaults to 60000.

The TransformerResourceType supports the following nested elements:

ElementDescriptionRequired
transformationParameterResourceProperties resource holding transformation parameters to apply. Type: PropertiesResourceTypeNo.
transformationParameterTransformation parameter to apply. Type: KeyValueTypeNo.
transformationOutputPropertyTransformation output property to apply. Type: KeyValueTypeNo.