ILOG JRules User Guide > Deploying Rules > Reference > RuleApp Management Using Ant > res-jar Task

The res-jar task creates a well-formed RuleApp archive with all its mandatory execution resources. The deployment descriptor uses a set of subelements to identify the different resources of each ruleset in the archive.

The following table describes the res-jar element attributes.

Table 1 res-jar Element Attributes
Element Attribute 
Description 
Required 
destfile 
The destination of the stored RuleApp archive file. 
Yes 
name 
The name of the RuleApp contained in the archive. Use only a-z, A-Z, 0-9, '_' and don't start with a digit. 
Yes 
version 
The version of the RuleApp contained in the archive is formatted with a major and minor version number. For example, 1.2. 
No. Default value is 1.0 
displayname 
The display name of the RuleApp, to give a more explicit name without constraint. Not used for the execution. 
No 
description 
A description of the RuleApp content. 
No 
failonerror 
If it is set to false, a warning message is logged when an error occurs, but the build is not stopped. 
No. Default value is true 
encoding 
The character encoding for file names inside the archive. Defaults to UTF-8. It is not recommended that you change this value, as a different value could make the created archive unreadable for Java. Used only with the deprecated attribute irlfile
Deprecated 

ruleset Subelement of <res-jar>

The following Ant project file provides an example of how to use the res-jar ruleset subelement:

<res-jar destfile="myruleapp.jar" name="myruleapp" version="1.0">
<ruleset rulesetarchive="rulesetarchive.jar" name="myruleset" version="1.0" />
</res-jar>

The ruleset subelement defines each ruleset for the RuleApp archive. It supports a set of subelements to build the XOM file for each ruleset:

Table 2 res-jar ruleset Subelement Attributes
Element Attribute 
Description 
Required 
rulesetarchive 
The ruleset archive file. 
Yes, if attribute irlfile is not used 
name 
The name of the ruleset. Use only a-z, A-Z, 0-9, '_' and don't start with a digit. 
Yes 
version 
The version of the ruleset formatted with a major and minor version number. For example, 1.2. 
No. Default value is 1.0 
displayname 
The display name of the ruleset, to give a more explicit name without constraint. Not used for the execution. 
No 
description 
A description of the ruleset content. 
No 
irlfile 
The IRL file. 
Deprecated 
generatexmlsignature 
A Boolean to generate a ruleset XML signature inside the RuleApp. To ensure compatibility mode, it must be set to true, otherwise you get an error message. 
Deprecated. Required with value of true if the attribute irlfile is used. 

property Subelement of <ruleset>

The property subelement is a subelement of the res-jar tag. The ruleset element declares the properties for a ruleset. The task generates a Java properties file that the rule engine uses at runtime.

Table 3 res-jar property Subelement Attributes
Element Attribute 
Description 
Required 
name 
The name of the property. 
Yes 
value 
The value of the property. 
Yes 

The following tags are deprecated and are supported only if the irlfile attribute is used and generatexmlsignature is set to true on the ruleset tag:

xomschema Subelement of <ruleset>

The xomschema subelement constructs a ruleset XOM by processing an XML schema (.xsd) file. This subelement is deprecated and should not be used when a ruleset archive is used on the <ruleset> tag.

Table 4 res-jar xomschema Subelement Attributes
Element Attribute 
Description 
Required 
sourcefile 
The source file of the XOM schema (.xsd). 
Deprecated 
packagename 
The target package name to compile the schema and transform it in a XOM file. 
Deprecated 

xomwsdl Subelement of <ruleset>

The xomwsdl subelement constructs a ruleset XOM by processing the WSDL descriptor of a Web service URL. This subelement is deprecated and should not be used when a ruleset archive is used on the <ruleset> tag.

Table 5 res-jar xomwsdl Subelement Attributes
Element Attribute 
Description 
Required 
url 
The URL of the WSDL descriptor. 
Deprecated 

xomfile Subelement of <ruleset>

The xomfile subelement constructs a ruleset XOM by adding the content of a XOM file (.xom). This subelement is deprecated and should not be used when a ruleset archive is used on the <ruleset> tag.

Table 6 res-jar xomfile Subelement Attributes
Element Attribute 
Description 
Required 
sourcefile 
The source file of the XOM (.xom). 
Deprecated 

classpath Subelement of <ruleset>

The classpath subelement declares the class path required to generate the XML ruleset signature. The class path must include the XOM, which the rule engine uses to generate the signature. This subelement is deprecated and should not be used when a ruleset archive is used on the <ruleset> tag.

For more information on the classpath subelement, see the Ant documentation, in particular path-like values.

Related Concepts

RuleApps and RuleApp Projects

Related Topics

Task Mappings
Rule Execution Server Tasks
res-fetch Task
res-fetch-all Task
res-deploy
res-undeploy Task
res-write-file Task
res-write-db Task
res-delete-file Task
res-delete-db Task

Related Tasks

Deploying and Exporting RuleApps

Related Samples and Tutorials

Tutorial: RuleApp Management
How to Automate Ruleset Management
How to Migrate RuleApps

Related Reference

RuleApp Management Using MBeans Accessor API
http://ant.apache.org/