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

kie maven plugin fails to build kjar if kmodule contains a ruleTemplate

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 7.8.0.Final
    • tools
    • None
    • 2019 Week 20-22
    • 5
    • Hide

      Create a maven project to support the Cheese lovers Drools example code, add the kie-maven-plugin to the pom.xml to build it, make sure your kmodule.xml includes the example ruleTemplate for the cheese lovers and you will easily reproduce the problem.

      Show
      Create a maven project to support the Cheese lovers Drools example code, add the kie-maven-plugin to the pom.xml to build it, make sure your kmodule.xml includes the example ruleTemplate for the cheese lovers and you will easily reproduce the problem.
    • Hide

      Don't use the kie-maven-plugin.

      Show
      Don't use the kie-maven-plugin.
    • NEW
    • NEW

      If I have a maven pom that uses the kie maven plugin org.kie:kie-maven-plugin to build the kljar for deployment, and the project kjar has a ruleTemplate:
      <ruleTemplate dtable="rules/business/TermSearchQFRules.xls"
      template="rules/business/templates/TermSearchQF.drt"
      row="2" col="1"/>
      The build will fail with an error:
      ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.8.0.Final:build (default-build) on project ba-search-kjar: Execution default-build of goal org.kie:kie-maven-plugin:7.8.0.Final:build failed: No RuleTable cells in spreadsheet. -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.kie:kie-maven-plugin:7.8.0.Final:build (default-build) on project ba-search-kjar: Execution default-build of goal org.kie:kie-maven-plugin:7.8.0.Final:build failed: No RuleTable cells in spreadsheet.
      Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-build of goal org.kie:kie-maven-plugin:7.8.0.Final:build failed: No RuleTable cells in spreadsheet.
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      ... 19 more
      Caused by: org.drools.template.parser.DecisionTableParseException: No RuleTable cells in spreadsheet.

      This is because the plugin doesn't understand the rule template, and treats the xls file as a decision table spreadsheet rather than a template spreadsheet.

      The kie-maven-plugin is a useful tool that compiles the kjar are build time rather than load time, and gives good diagnostics.

            mfusco@redhat.com Mario Fusco
            webster.homer Webster Homer (Inactive)
            Tibor Zimányi Tibor Zimányi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: