Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-1746

The drools-ant task cannot compile decision tables (.xls files)

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 4.0.7, 5.0.0.M1
    • drools-ant
    • None

    Description

      There is a bug in the drools-ant task which prevents it from compiling .xls files - it checks whether fileName.equals(".xls") instead of filename.endsWith(".xls") - so it defaults to trying to compile .xls files as if they were .drl files.

      Patch to trunk follows...

      Index: src/main/java/org/drools/contrib/DroolsCompilerAntTask.java
      ===================================================================
      — src/main/java/org/drools/contrib/DroolsCompilerAntTask.java (revision 21630)
      +++ src/main/java/org/drools/contrib/DroolsCompilerAntTask.java (working copy)
      @@ -231,7 +231,7 @@
      builder.addRuleFlow(instream);
      } else if (fileName.endsWith(DroolsCompilerAntTask.XMLFILEEXTENSION))

      { builder.addPackageFromXml(instream); - }

      else if (fileName.equals(DroolsCompilerAntTask.XLSFILEEXTENSION))

      { + }

      else if (fileName.endsWith(DroolsCompilerAntTask.XLSFILEEXTENSION)) {

      final SpreadsheetCompiler converter = new SpreadsheetCompiler();
      final String drl = converter.compile( new FileInputStream(file),

      Attachments

        Activity

          People

            trikkola Toni Rikkola
            felthy Peter Feltham (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty