Version 2

    You can always use an Ant task to help automating the deployment of your rules. The DRools distribution provides two sample tasks, their code can be seen here:

     

    http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-ant/src/main/java/org/drools/contrib/

     

    There's also a sample Ant file to be run from Eclipse, maybe set as post build step:

     

    http://anonsvn.labs.jboss.com/labs/jbossrules/trunk/drools-ant/src/test/resources/DroolsAntTask.xml

     

    If you want to run Ant from outside Eclipse, you should add the Eclipse JDT compiler to the drools.classpath as it's needed for rules compilation. Failing that you'll receive the error: Unable to load dialect 'org.drools.rule.builder.dialect.java.JavaDialect:java'

         <path id="droolsutils.classpath">
              <fileset dir="${TARGET_PLATFORM}/plugins">
                   <include name="**/org.eclipse.jdt.*.jar" ></include>
              </fileset>
              ...

     

    Depending on your configuration you might get also the similar error: Unable to load dialect 'org.drools.rule.builder.dialect.mvel.MVELDialectConfiguration:mvel' telling you should add the MVEL jar to the same classpath.

     

    The Eclipse JDT compiler can be downloaded from here, choose the needed release and browse to "JDT runtime binary":

     

    http://download.eclipse.org/eclipse/downloads/