[
https://issues.jboss.org/browse/DROOLS-1645?page=com.atlassian.jira.plugi...
]
Mario Fusco commented on DROOLS-1645:
-------------------------------------
I launched the main in the Application class, and it seems to work for me, or at least the
rule gets fired and indeed it prints
{code}
2017-07-04 19:22:26.017 INFO 21441 --- [ main]
o.d.c.k.builder.impl.KieRepositoryImpl : KieModule was added:
FileKieModule[releaseId=org.default:artifact:1.0.0-SNAPSHOT,file=/home/mario/Downloads/droolsSpringBootIssue-master/build/resources/main]
>> Rule fired <<<
2017-07-04 19:22:27.105 INFO
21441 --- [ main] com.company.Application : Started Application
in 4.734 seconds (JVM running for 5.347)
{code}
What am I missing?
Wildcard in packages does not work in Spring Boot jar
-----------------------------------------------------
Key: DROOLS-1645
URL:
https://issues.jboss.org/browse/DROOLS-1645
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 7.0.0.Final
Reporter: Jacek Hola
Assignee: Mario Fusco
In applications built with Spring Boot the resources under {{src/main/resources/}} are
packed into jar in {{BOOT-INF/classes/}}. That's why when in {{kmodule.xml}} someone
specifies
{code:xml}
<kbase name="base" default="true"
packages="com.company.*">
...
</kbase>
{code}
then for example resource {{src/main/resources/com/company/rule.drl}} will not be picked
up, because the path in jar(zip) is {{BOOT-INF/classes/com/company/rule.drl}}.
From my investigation it seems the logic in
org.drools.compiler.kie.builder.impl.KieBuilderImpl#isFileInKieBase does not recognize
these files as it compares the packages for equality or if one starts with the other.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)