[rules-dev] Compile Drools using ant script

Roopa roopa.musuley at gmail.com
Thu Aug 15 12:13:33 EDT 2013


Hi,

I am facing a problem building drl files using ant script.

Drl files are importing few java files.

I was successful in setting the drools compiler using
org.drools.contrib.DroolsCompilerAntTask

But the drl files is unable to find the java imports.

Here is my code:
<path id="compile.classpath">
        <fileset dir="${lib.dir}">
            <include name="**/*.jar"/>
            <exclude name="Drools/drools-compiler-5.5.0.Final.jar"/>
            <exclude name="Drools/drools-core-5.5.0.Final.jar"/>
            <exclude name="Drools/log4j-1.2.14.jar"/>
        </fileset>
    </path>

    <taskdef name="droolsCompiler"
classname="org.drools.contrib.DroolsCompilerAntTask">
        <classpath refid="drools.lib.path"/>
    </taskdef>

<target name="compile-drools" depends="build-rules">
        <droolsCompiler srcDir="${rules.dir}/src/main/rules"
toFile="${build.target}/classes/validation.pkg"
        binformat="package" bintype="knowledge-module" >
            <classpath refid="compile.classpath"/>

            <include name="*.drl"/>
        </droolsCompiler>
    </target>

Please do help me with the build.xml file which compiles drl files which
are importing java files with in.

I am getting the below error
 Unable to resolve ObjectType 'AOCCRuleKnobConfig' : [Rule
name='ExecuteQuery']

which is in a java file.

Please do the needful.

Thank You in advance.




--
View this message in context: http://drools.46999.n3.nabble.com/Compile-Drools-using-ant-script-tp4025562.html
Sent from the Drools: Developer (committer) mailing list mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20130815/0fd86146/attachment.html 


More information about the rules-dev mailing list