Building/deploying a EJB .jar with its dependencies

混江龙づ霸主 提交于 2019-12-12 11:27:56

问题


I am new to Java EE. I use Maven, Eclipse and jBoss/WildFly.

I have a war project. When I build the project all its dependencies are packaged inside the war file in WEB-INF/lib.

Now I am trying to create a ejb project (I have <packaging>ejb</packaging> in the pom.xml). I want to deploy it as a separate project (not as a part of the war). When I build the ejb project Maven does not package any dependencies in the jar.

How can I package/deploy a ejb .jar with its dependencies?

UPDATE: I'd like to avoid packaging EJBs in an .ear if it is possible. (I do not want to create one more Maven project).


回答1:


The best solution is package your project as ear. But if don't want use ear, maven assembly plugin can help you to package all needed jars in one file. This solution is only for "proof of concept" variant, and cannot be used in production mode, by licences limitation for example.



来源:https://stackoverflow.com/questions/28768762/building-deploying-a-ejb-jar-with-its-dependencies

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