将 Spring 应用程序部署为 Glassfish v3 的耳朵 - 模棱两可的 DeploymentException“无法识别模块类型”
我正在尝试将 .ear 部署到 Glassfish v3。 .ear 是一个“Spring”应用程序,由两个模块组成:
domain.jar
(实体、持久性)service.jar
(带有 spring bean 配置的业务逻辑)。
我正在使用 Maven Ear 插件创建 .ear,所得的 .ear 目录结构如下:
/APP-INF/lib/domain.jar;service.jar
/META -INF/application.xml
我已将 Spring dist 复制到 /glassfish/lib,以便应用程序服务器上的所有域都可以使用它。
更新:
事实证明,从ear pom.xml
中注释掉
将使其部署。但是我的 domain.jar
没有部署。
I am trying to deploy an .ear to Glassfish v3. The .ear is a "Spring" application made up of two modules:
domain.jar
(entities, persistence)service.jar
(business logic with spring bean config).
I'm creating the .ear with Maven ear plugin and the resultant dir structure of the .ear is as follows:
/APP-INF/lib/domain.jar;service.jar
/META-INF/application.xml
I've copied the Spring dist to /glassfish/lib so it is available to all domains on the app server.
UPDATE:
It turns out that commenting out <includeInApplicationXml>true</includeInApplicationXml>
from the ear pom.xml
will make it deploy. But then my domain.jar
is not deployed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不明白你的 EAR 的结构。为什么要将
domain.jar
和service.jar
(这个包含 EJB,对吗?)作为实用程序 JAR 打包在APP-INF/lib
下?这对我来说看起来不正确,我希望得到以下结构:我是否缺少有关您的应用程序的某些内容?
Java EE 教程的打包应用程序部分相当不错。
因为我总是忘记如何使用 maven-ear-plugin 可能会有所帮助...如果您确实需要 EAR。
I don't understand the structure of your EAR. Why are you packaging
domain.jar
andservice.jar
(this one contains EJBs right?) as utility JAR underAPP-INF/lib
? This doesn't look correct to me and I'd expect the following structure instead:Am I missing something about your app?
The Packaging Applications section of the Java EE tutorials is pretty decent.
Because I always forget how to use maven-ear-plugin could help... if you really need an EAR.