构建/部署具有依赖关系的EJB .jar [英] Building/deploying a EJB .jar with its dependencies
问题描述
我有一个 war
项目。当我构建项目时,它的所有依赖项都被包装在 war
文件的 WEB-INF / lib
中。
现在我试图创建一个 ejb
项目(我有< packaging> ejb< /在
)。我想将其部署为单独的项目(不是 pom.xml
中打包> war
的一部分)。当我构建 ejb
项目时,Maven不会在 jar c $ c>中打包任何依赖项。
如何打包/部署一个 ejb
.jar
其依赖项?
更新:我想避免在 .ear 中打包EJB $ c>如果可能的话。 (我不想再创建一个Maven项目)。
最好的解决方案是将您的项目打包为耳朵。但是如果不想使用耳机,maven汇编插件可以帮助您将所有需要的jar包放在一个文件中。此解决方案仅适用于概念证明变体,并且不能通过许可证限制在生产模式下使用。
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).
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.
这篇关于构建/部署具有依赖关系的EJB .jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!