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

后端 未结 1 1115
余生分开走
余生分开走 2021-02-04 01:57

Today I upgraded my local Glassfish server to 3.1.1 in preparation for my company\'s upgrading of the servers to the same version. I am attempting to convert my web service proj

1条回答
  •  故里飘歌
    2021-02-04 02:43

    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:

    
        com.groupId
        webservice-service-ejbs
        ${project.version}
        ejb
        provided
    
    

    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

    
        com.groupId
        webservice-service-ejbs
        ejb
    
    

    Thanks to those who helped me out.

    0 讨论(0)
提交回复
热议问题