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

kie-maven-plugin:generateDMNModel is unable to compile DMN files with imports

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 7.67.0.Final
    • dmn engine
    • None
    • Hide
      1. Create KJAR maven module with multiple DMN files which import each other. Example:
        • Common.dmn contains some common functionality used by other DMNs
        • Decision.dmn imports Common.dmn
      2. Cofigure kie-maven-plugin to compile the DMNs:
        1. add "<generateDMNModel>yes</generateDMNModel>" property
        2. add "drools-model-compiler" dependency
      3. run "mvn clean install"
      4. the build can be successful if kie-maven-plugin compiles Common.dmn at first and then Decision.dmn. The log will have something like the following:
      [INFO] dmnFiles to process: [org/simplekjar/Common.dmn, org/simplekjar/Decision.dmn] 

      5. the build will fail if kie-maven-plugin tries to compile Decision.dmn before Common.dmn. The log will have something like the following:

      [INFO] dmnFiles to process: [org/simplekjar/Decision.dmn, org/simplekjar/Common.dmn]  
      [ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.67.0.Final:generateDMNModel (default-generateDMNModel) on project post-lab-orchestrator-dmn: Execution default-generateDMNModel of goal org.kie:kie-maven-plugin:7.67.0.Final:generateDMNModel failed: java.lang.RuntimeException: Could not locate required dependency while importing DMN for namespace: https://kiegroup.org/dmn/_F94D6A54-1B34-4CBD-9B43-0EE3261D470A, name: common, modelName: null. -> [Help 1]
      

      The defect is not 100% reproducible. In order to reproduce the issue it can be required to rename the DMN files to get the order when Decision.dmn is compiled before Common.dmn.

      I'm under impression that the issue is caused by the fact that GenerateDMNModelMojo compiles DMN files one by one while it should compile them all at once.

      Show
      Create KJAR maven module with multiple DMN files which import each other. Example: Common.dmn contains some common functionality used by other DMNs Decision.dmn imports Common.dmn Cofigure kie-maven-plugin to compile the DMNs: add "<generateDMNModel>yes</generateDMNModel>" property add "drools-model-compiler" dependency run "mvn clean install" the build can be successful if kie-maven-plugin compiles Common.dmn at first and then Decision.dmn. The log will have something like the following: [INFO] dmnFiles to process: [org/simplekjar/Common.dmn, org/simplekjar/Decision.dmn] 5. the build will fail if kie-maven-plugin tries to compile Decision.dmn before Common.dmn. The log will have something like the following: [INFO] dmnFiles to process: [org/simplekjar/Decision.dmn, org/simplekjar/Common.dmn]   [ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.67.0.Final:generateDMNModel ( default -generateDMNModel) on project post-lab-orchestrator-dmn: Execution default -generateDMNModel of goal org.kie:kie-maven-plugin:7.67.0.Final:generateDMNModel failed: java.lang.RuntimeException: Could not locate required dependency while importing DMN for namespace: https: //kiegroup.org/dmn/_F94D6A54-1B34-4CBD-9B43-0EE3261D470A, name: common, modelName: null . -> [Help 1] The defect is not 100% reproducible. In order to reproduce the issue it can be required to rename the DMN files to get the order when Decision.dmn is compiled before Common.dmn. I'm under impression that the issue is caused by the fact that GenerateDMNModelMojo compiles DMN files one by one while it should compile them all at once.
    • NEW
    • NEW
    • ---
    • ---

      kie-maven-plugin:generateDMNModel is unable to compile DMN files with imports

              mmortari@redhat.com Matteo Mortari
              vladimir.piyanov@gmail.com Vladimir Piyanov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: