Maven doesn't recognize EJB as dependency of project when trying to define module

柔情痞子 提交于 2019-12-03 01:33:14

The answer ended up being pretty simple, and I'm kicking myself a bit for it. In the webapp's pom file, I just had to add the scope line to the ejb dependency:

<dependency>
    <groupId>com.groupId</groupId>
    <artifactId>webservice-service-ejbs</artifactId>
    <version>${project.version}</version>
    <type>ejb</type>
    <scope>provided</scope>
</dependency>

With this, I could keep the ejb dependency in the ear pom, application.xml generated properly and glassfish 3.1.1 didn't get confused thinking there were multiple ejb classes with the same name.

EDIT: Here's what the ejb dependency looks like in the ear pom

<dependency>
    <groupId>com.groupId</groupId>
    <artifactId>webservice-service-ejbs</artifactId>
    <type>ejb</type>
</dependency>

Thanks to those who helped me out.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!