Luisetelo
Luisetelo

Reputation: 106

Indicating kmodule.xml to drools

I am developing an application using Drools 6.1.0. I create a stateless session:

KieServices kieServices = KieServices.Factory.get();
KieContainer kContainer = kieServices.getKieClasspathContainer();
kSession = kContainer.newStatelessKieSession();

Also I got a default kmodule.xml:

<?xml version="1.0" encoding="UTF-8"?> <kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule"> </kmodule>

It could be found at META-INF/kmodule.xml

When I run the application on Eclipse it works perfectly. I am trying to pack the app in a runnable jar file. However when I run the jar file the kmodule.xml can't be found.

How can I indicate to my application wheres is the kmodule.xml file? Is there any other alternative than using the classpath?

Thank you!

Upvotes: 4

Views: 5478

Answers (1)

salaboy
salaboy

Reputation: 4143

Are you using a maven structure? the kmodule.xml file needs to be inside the src/main/resources/META-INF/ directory as far as I remember.

Upvotes: 1

Related Questions