将 Open Liberty 与 Maven 结合使用时出现 CWWKF0044E 不兼容功能错误,但我没有配置不兼容功能

Getting CWWKF0044E incompatible feature error using Open Liberty with Maven, but I didn't configure incompatible features

当使用 Open Liberty 版本 22.0.0.5 和 liberty-maven-plugin 版本 3.3 时,服务器配置 (server.xml) 仅配置一个功能:

    <featureManager>
        <feature>batch-2.0</feature>
    </featureManager>

和运行“开发模式”(通过mvn liberty:dev),我在开发模式启动服务器时收到此错误:

[INFO] [ERROR ] CWWKF0044E: The io.openliberty.connectionManager1.0.internal.ee-6.0 and batch-2.0 features cannot be loaded at the same time. The io.openliberty.connectionManager1.0.internal.ee-6.0 feature of Java EE 6 is incompatible with the batch-2.0 feature of Jakarta EE 9. The batch-2.0 and batch-2.0 configured features include an incompatible combination of features. Your configuration is not supported. Update the configuration to use features that support either the Java EE or Jakarta EE programming models, but not both.

[INFO] [WARNING ] CWWKF0046W: The configuration includes an incompatible combination of features. As a result, the feature manager did not install any features.

解决方案

这是一个错误。要解决此问题,请将 liberty-maven-plugin 更新到最新版本(或至少更新到版本 3.4,这是 fixed)。

从运行时的角度here描述了该错误,因为它是 liberty-maven-plugin 查询 Open Liberty 运行时功能版本的方式的问题。