Error "Unable to build KieBase, could not find include:" while building KJAR with kie-maven-plugin

Solution Verified - Updated -

Issue

When building a KJAR project which uses includes to include another KieBase dependency from kmodule.xml, the buiilding process fails in some enviornment with the error message "Unable to build KieBase, could not find include: ..."

The kmodule.xml which reference another KieBase as dependency looks like below:

<kbase name="examplekbase" default="false" packages="*" includes="subkbase">

The maven building error looks like below:

[ERROR] Unable to build KieBase, could not find include: subkbase
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.306 s
[INFO] Finished at: 2020-01-08T13:06:16+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.kie:kie-maven-plugin:7.23.0.Final-redhat-00003:build (default-build) on project exampleproject: Execution default-build of goal org.kie:kie-maven-plugin:7.23.0.Final-redhat-00003:build failed: Unable to get KieModule, Errors Existed: Error Messages:
[ERROR] Message [id=1, kieBase=examplekbase, level=ERROR, path=src/main/resources/META-INF/kmodule.xml, line=0, column=0
[ERROR]    text=Unable to build KieBase, could not find include: subkbase]
[ERROR] ---
[ERROR] Warning Messages:
[ERROR] ---
[ERROR] Info Messages:
[ERROR]
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.kie:kie-maven-plugin:7.23.0.Final-redhat-00003:build (default-build) on project exampleproject: Execution default-build of goal org.kie:kie-maven-plugin:7.23.0.Final-redhat-00003:build failed: Unable to get KieModule, Errors Existed: Error Messages:
Message [id=1, kieBase=examplekbase, level=ERROR, path=src/main/resources/META-INF/kmodule.xml, line=0, column=0
   text=Unable to build KieBase, could not find include: subkbase]
---
Warning Messages:
---
Info Messages:

    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
......

Environment

  • Red Hat Decision Manager (RHDM)
    • 7.x
  • Red Hat Process Automation Manager (RHPAM)
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In