我使用Drools的DroolsCompilerAntTask建立包二進制文件,如下面Ant構建成功,甚至syntaxx錯誤
<taskdef name="compiler" classname="org.drools.contrib.DroolsCompilerAntTask" classpathref="drools.path" />
<target name="rules" >
<compiler
binformat="package"
srcdir="${path}/src/rules"
tofile="${path}/build/rules.pkg"
classpathref="compile.classpath" >
<include name="*.drl" />
<include name="*.brl" />
<include name="*.xml" />
</compiler>
</target>
但是當我運行的版本。我能夠得到錯誤信息,甚至出現構建仍顯示成功的錯誤。
rule-clean:
rules:
[compiler] [8,0]: [ERR 107] Line 8:0 mismatched input 'asdasd' expecting one of the following tokens: '[package, import, global, declare, function, rule, query]'.
[compiler] [0,0]: Parser returned a null Package
[compiler] [8,0]: [ERR 107] Line 8:0 mismatched input 'asdasd' expecting one of the following tokens: '[package, import, global, declare, function, rule, query]'.
[compiler] [0,0]: Parser returned a null Package
BUILD SUCCESSFUL
Total time: 41 seconds
有沒有解決方案讓流水編譯器失敗時生成失敗?
你使用的是什麼版本的流口水? –
5.4.0.Final從drools回購 – logger