Drools 不会加载 WildFly 14

Drools will not load with WildFly 14

正在尝试将现有应用程序从 Wildfly 10.0.0.Final 升级到 WildFly 21.0.0.Final 并将其移动到容器中。我正在使用 Java 11 和最新版本的 Drools (7.46.0.Final)。当我启动 WildFly 14 或更高版本时,当 Drools 尝试加载时出现以下错误:

ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 96) MSC000001: Failed to start service jboss.deployment.unit."example.war".undertow-deployment: org.jboss.msc.service.StartException in service jboss.deployment.unit."example.war".undertow-deployment: java.lang.RuntimeException: java.lang.RuntimeException: Cannot find KieModule: com.package:example-validation:0.0.1

就在这一行之前,我在日志中注意到这条消息:

[org.drools.compiler.kie.builder.impl.KieRepositoryImpl] (ServerService Thread Pool -- 96) Artifact not fetched from maven: com.package:example-validation:0.0.1-SNAPSHOT. To enable the KieScanner you need kie-ci on the classpath

奇怪的是我将 kie-ci 放在类路径中。以下是子示例验证项目 pom.xml 的相关部分:

  <packaging>kjar</packaging>
  <artifactId>example-validation</artifactId>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <addMavenDescriptor/>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.kie</groupId>
        <artifactId>kie-maven-plugin</artifactId>
        <extensions>true</extensions>
      </plugin>
    </plugins>
  </build>

  <dependencies>
      <dependency>
          <groupId>org.kie</groupId>
          <artifactId>kie-ci</artifactId>
          <version>${drools.version}</version>
      </dependency>
      <dependency>
          <groupId>org.drools</groupId>
          <artifactId>drools-compiler</artifactId>
      </dependency>
      ....
  </dependencies>

但是当我在子项目上 运行 mvn clean install 时,我收到以下消息:

[INFO] Artifact not fetched from maven: org.drools:drools-compiler:7.46.0.Final. To enable the KieScanner you need kie-ci on the classpath
[INFO] Artifact not fetched from maven: org.kie:kie-ci:7.46.0.Final. To enable the KieScanner you need kie-ci on the classpath

如何在类路径中获取 kie-ci 以便在类路径中获取 kie-ci?我看到有人在这里遇到了类似的问题 (),但公认的解决方案是升级 Drools(我有)。同样,这适用于 Wildfly 10.0.0.Final,因此我认为这不是我们规则的问题,因为我在现有版本的 Drools (6.5.0.Final) 上遇到了同样的问题。我也尝试将 kie-ci 添加到父项目,但没有骰子。

我的项目中有很多这样的 kie-ci 警告,直到我从 [1] 中发现您需要添加包含以下内容的文件 jboss-all.xml

<jboss xmlns="urn:jboss:1.0">
    <weld xmlns="urn:jboss:weld:1.0" require-bean-descriptor="true"/>
</jboss>


  [1]: