在包含 ejb 模块的 Payara 5 中部署 ear 文件时遇到问题

Trouble with deploying ear-file in Payara 5, that contains ejb-module

我正在尝试部署 ear 文件,该文件在 Payara 5.184 的依赖项中包含 ejb 模块并出现错误:

11.02.2019 13:57:15.938 | [payara-executor-service-scheduled-task] | ERROR | Exception while deploying the app [my-ear-SNAPSHOT]
11.02.2019 13:57:15.945 | [payara-executor-service-scheduled-task] | ERROR | Exception during lifecycle processing
java.lang.IllegalArgumentException: Invalid ejb jar [lib/my-ejb.jar]: it contains zero ejb. 
Note: 
1. A valid ejb jar requires at least one session, entity (1.x/2.x style),
   or message-driven bean. 
2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar. 
3. If the jar file contains valid EJBs which are annotated with EJB component
   level annotations (@Stateless, @Stateful, @MessageDriven, @Singleton),
   please check server.log to see whether the annotations were processed properly.

使用 payara 4.1,不会出现此错误。我应该如何修复部署错误?

我的 pom 文件有一个简短版本:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>my</groupId>
        <artifactId>my-ears</artifactId>
        <version>SNAPSHOT</version>
    </parent>
    <artifactId>my-ear</artifactId>
    <packaging>ear</packaging>
    <dependencies>
        <dependency>
            <groupId>my</groupId>
            <artifactId>my-ejb</artifactId>
            <version>${project.version}</version>
            <type>ejb</type>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ear-plugin</artifactId>
                <configuration>
                    <version>6</version>
                    <generateApplicationXml>true</generateApplicationXml>
                    <skinnyWars>true</skinnyWars>
                    <defaultJavaBundleDir>lib/</defaultJavaBundleDir>
                    <defaultLibBundleDir>lib</defaultLibBundleDir>
                    <filtering>true</filtering>
                    <modules>
                        <ejbModule>
                            <groupId>my</groupId>
                            <artifactId>my-ejb</artifactId>
                            <bundleDir>/lib</bundleDir>
                        </ejbModule>
                    </modules>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

问题出在 domain.xml。我只是从 payara 4.1 配置文件夹中复制它,这是错误的决定。正确的方法是:获取原始文件并不断对其进行更改。不幸的是,EJB还有一个问题,但是上面描述的所有错误都没有了。