Hi,
You can use below ant script to build .pkg files
<project default="rules" name="RuleProject">
<!-- Uncomment this for Maven Runner -->
<property name="eclipsepath" value="."/>
<!-- Uncomment this for Eclipse Runner -->
<!-- <property name="eclipsepath" value="../../../"/> -->
<path id="cheese.classpath">
<pathelement location="${eclipsepath}/build/Beans.jar"/>
</path>
<target name="beans" >
<tstamp/>
<echo message="CREATING Beans JAR..."/>
<jar
jarfile="./build/Beans.jar">
<fileset
dir="./bin"/>
</jar>
</target>
<path>
<pathelement></pathelement>
</path>
<path id="drools.classpath">
<fileset dir="${eclipsepath}/build/lib/">
<include name="*.jar"/>
</fileset>
<pathelement location="target"/>
</path>
<taskdef name="compiler" classname="org.drools.contrib.DroolsCompilerAntTask" classpathref="drools.classpath" />
<target name="rules" >
<compiler
srcdir="${eclipsepath}/src/main/rules"
tofile="${eclipsepath}/target/cheese.pkg"
classpathref="cheese.classpath"
binformat="package" >
<include name="*.drl" />
<!-- <include name="*.brl" />
<include name="*.xml" />
<include name="*.dslr" /> -->
</compiler>
</target>
</project>
reference http://www.nabble.com/Ant-compiler-task--td15906277.html#a15907448
Regards,
Ravi T