The res-deploy task deploys a RuleApp archive to a running Rule Execution Server. The task performs a HyperText Transfer Protocol (HTTP) or an HTTP Over SSL (HTTPS) upload of the archive.
The following Ant task code provides an example of how to deploy a RuleApp:
<res-deploy hostname="localhost" portnumber="7001" userid="bres"
password="mypassword" file="myruleapp.jar"/>
The following Ant task code provides an example of how to run an encrypted res-deploy task using the credentialsfile attribute:
<res-deploy hostname="localhost" portnumber="7001"
credentialsfile="mypasswordfile" file="myruleapp.jar"/>
where credentialsfile is a text file that contains:
|
username=bres
password=mypassword |
The file must follow the Java property files format. See http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html#load(java.io.InputStream). After the first execution of the res-deploy ANT task, the contents are encrypted. For example:
|
username={DES}oLHZROlruWw\=
password={DES}als58ekruWw\= |
With encryption, the userid and password never appear in plain text in traces during the RuleApp deployment operation.
The following Ant task code provides an example of how to pass a trusted key to the Ant task so that it authenticates with SSL on the application server:
java -Dant.home=c:\ant
-Djavax.net.ssl.keyStore=stecert.jks
-Djavax.net.ssl.trustStore=cacerts.jks
org.apache.tools.ant.Main bres_deploy
The following table describes the res-deploy element attributes and specifies whether or not they are required elements.
Table 9 res-deploy Element Attributes
Element Attribute |
Description |
Required |
file |
The path of the RuleApp archive to deploy. |
Yes |
portnumber |
The port number of the Rule Execution Server Console. |
Yes |
hostname |
The host name of the server where the Rule Execution Server Console is installed. |
Yes |
userid |
The user name to log in the Rule Execution Server Console. If this attribute is present, the credentialsfile attribute must not be used. |
No |
password |
The password of the user that is allow to log in the Rule Execution Server Console. If this attribute is present, the credentialsfile attribute must not be used. |
No |
credentialsfile |
A file containing the userid and password, encrypted when the attribute is first used. If this attribute is present, you must not use the userid and password attributes. |
No |
mergingpolicy |
The server uses the merge policy to process the RuleApp archive. This attribute can take the following values:
ADD_AT_END_MERGING_POLICY: The existing RuleApp is not modified and the version number of the new RuleApp is incremented to avoid a conflict. For example, if the RuleApp /MyRuleApp/1.0 already exists and you try to import a RuleApp archive that contains a RuleApp /MyRuleApp/1.0, the existing RuleApp is not modified and the new RuleApp is added with the version 2.0.
REPLACE_MERGING_POLICY: The existing RuleApp is replaced by the new RuleApp. With this policy, the argument versioningPolicy is not used.
ADD_AT_END_RULESET_MERGING_POLICY: The existing ruleset is not modified and the version number of the new ruleset is incremented to avoid a conflict.
REPLACE_RULESET_MERGING_POLICY: The existing ruleset is replaced by the new ruleset. With this policy, the argument versioningPolicy is not used. |
No, default value is ADD_AT_END_MERGING_POLICY |
versioningpolicy |
The server uses the versioning policy to process the RuleApp archive. This attribute can take the following values:
MAJOR_VERSION_POLICY
MINOR_VERSION_POLICY |
No, default value is MAJOR_VERSION_POLICY |
failonerror |
The default is set to true. If it is set to false, a warning message is logged when an error occurs, but the build is not stopped. |
No |
webapp |
The prefix of the Rule Execution Server Console. |
No, default value is bres |
secured |
The default is set to false. If it is set to true, the task performs an HTTPS upload. |
No |
Related Concepts
Related Topics
Related Tasks
Related Samples and Tutorials
Related Reference