Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-1645

Wildcard in packages does not work in Spring Boot jar

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.1.0.Final
    • 7.0.0.Final
    • core engine
    • None
    • 2017 Week 26-27
    • NEW
    • NEW

      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

      <kbase name="base" default="true" packages="com.company.*">
      ...
      </kbase>
      

      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.

            mfusco@redhat.com Mario Fusco
            display.none Jacek Hola (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: