ILOG JRules User Guide > Deploying Rules > Tasks > Deploying and Exporting RuleApps > Deploying and Writing RuleApps Using Ant

You can deploy a RuleApp archive to a running Rule Execution Server, and write a RuleApp to a file system or database using Ant tasks.

To run the res-deploy task using the element attributes:

<res-deploy hostname="localhost" portnumber="7001" userid="bres"
 password="mypassword" file="myruleapp.jar"/>

To add a RuleApp archive to the file persistence of Rule Execution Server:

<res-write-file dir="res_data" file="myruleapp.jar" />

To add a RuleApp archive to the database persistence using the element attributes:

<res-write-db driver="oracle.jdbc.driver.OracleDriver" 
               url="jdbc:oracle:oci:@//localhost:1521/default" 
               userid="bres" password="mypassword" file="myruleapp.jar">
   <classpath>
      <pathelement location="classes12.jar"/>
   </classpath>
</res-write-db>

For more details about these and other Ant tasks, see RuleApp Management Using Ant.

Related Tasks

Deploying One or More RuleApps to a Single Rule Execution Server
Deploying a RuleApp to One or More Rule Execution Servers