Checking drl file when compiling with maven

First, I tried to use kie-maven-plugin in the parent project:

<groupId>org.kie</groupId>
<artifactId>kie-maven-plugin</artifactId>
<version>6.1.0.Final</version>
<extensions>true</extensions>

      

but upon further reading it doesn't look like it is actually precompiling the rules before putting them in the jar (and I don't see any indication that it does).

I can also see that there is a drools verifier, however it seems that this only works for checking drl files in Java.

Is there a good way to compile / check the drl file in the Maven build so that I don't deploy and run the webservice to find that there is a typo in the drl file?

I am currently using Eclipse Kepler with Drools, Maven 3.x and Drools 6.0.1 plugins.

+3


source to share


1 answer


I would assume that you forgot to specify the packaging as "kyar". If so, the plugin will not be executed during Maven build. Just add <packaging>kjar</packaging>

to pom.xml.

Please see an example using kie-maven-plugin: https://github.com/droolsjbpm/drools/blob/master/kie-maven-plugin-example/pom.xml



As far as I know, the kie-maven-plugin only checks that the resources can be compiled. Drools verification is not part of the execution.

If you're already using the "kjar" packaging, submit the entire pom.xml, otherwise it's hard to guess what is actually causing the described behavior.

+3


source







All Articles