res-write-xom-file
The res-write-xom-file Ant task adds XOM, JAR, ZIP, or Java™ resources, or a library or both, to the file persistence layer of Rule Execution Server. This task does not notify any other Rule Execution Server component or execution unit (XU) instance.
When you deploy a set of JAR files with the jarMajorVersion increment policy set to true, each new JAR is deployed with an incremented major version number to the file system (that is, with the same name but a different SHA-1 checksum). If you set the jarMajorVersion increment policy to false, the minor version number is incremented.
res-write-xom-file nested element
The xompath nested
element specifies a Path-like
structure
. All the files included in this path are placed in
the internal layer of the Rule Execution Server console
as a JAR resource, in the same order as listed in the path. The xompath element
supports the nested fileset element (see FileSet
).
res-write-xom-file element attributes
The following table describes the element attributes of the res-write-xom-file Ant task and specifies whether they are mandatory or optional.
| Element attribute | Description | Mandatory/optional |
|---|---|---|
| dir | The path to the root directory of the file persistence. | Mandatory |
| failonerror | If you set this attribute to false, a warning message is logged when an error occurs, but the build process is not stopped. | Optional The default value is true. |
| jarMajorVersion | The server uses the version policy to process the XOM, JAR, ZIP, or Java resources. If you set this attribute to true, the major version number is incremented, if applicable. Otherwise, the minor version number is incremented. | Optional The default value is false. |
| libMajorVersion | The server uses the version policy to process the library. If you set this attribute to true, the major version is incremented, if applicable. Otherwise, the minor version is incremented. | Optional The default value is false. |
| libMergingPolicy | The server uses the merging policy to process the library. This
attribute can take the following values:
|
Optional |
| libName | The server uses this name to create a library. If you do not set this attribute, no library is created and the other library attributes, libMajorVersion and libMergingPolicy, are ignored. | Optional |
| outputRulesetProperty | If you set this attribute, the result of the computed property ruleset.managedxom.uris is assigned to a new property that is created with the given name. To rename a resource inside the internal persistence, the best way is to rename the JAR file before the deployment process. | Optional |
Example
<res-write-xom-file dir="c:/res-xom-dir"
jarMajorVersion="true"
outputRulesetProperty="ruleset.managedxom.uris">
<xompath>
<fileset dir="./xoms">
<include name="**/*.jar"/>
</fileset>
</xompath>
</res-write-xom-file>
<echo message="Resulting property: ${ruleset.managedxom.uris}"/>