[英]Deploying an EJB .jar to jBoss/WildFly from Eclipse
I am new to Java EE. 我是Java EE的新手。 I use Eclipse, jBoss/WildFly and Maven. 我使用Eclipse,jBoss / WildFly和Maven。 I have a multi module Maven project: 我有一个多模块Maven项目:
pom
) 父Maven项目( pom
)
war
) 网络应用程序( war
) jar
) EJB项目( jar
) Currently, the EJB jar
project is packaged inside the web application and the entire solution is deployed as one war
file. 当前,EJB jar
项目打包在Web应用程序内部,并且整个解决方案作为一个war
文件部署。
I want to change it: I need to deploy the war
and the jar
projects to the application server independently (as two independent applications). 我要更改它:我需要将war
和jar
项目分别部署到应用程序服务器(作为两个独立的应用程序)。 Then the web project could access the EJBs via their remote interfaces. 然后,Web项目可以通过其远程接口访问EJB。
The problem: 问题:
I can deploy the war
project in Eclipse with the Run As
> Run On Server
context menu, however when I attempt to deploy the jar
project in the same way, I get an error message saying that the project cannot be deployed. 我可以使用“ Run As
> Run On Server
上下文菜单在Eclipse中部署war
项目,但是当我尝试以相同的方式部署jar
项目时,我收到一条错误消息,指出无法部署该项目。
How can I deploy my projects independently from Eclipse? 如何独立于Eclipse部署项目?
Should I wrap the jar
project into an ear
project? 我应该将jar
项目包装到ear
项目中吗? If so, can I convert my jar
project into an ear
project, or do I have to keep my jar
project and create one more project to wrap it into an ear
? 如果是这样,我可以将jar
项目转换为ear
项目,还是必须保留jar
项目并创建另一个项目以将其包装到ear
? (I would no like to introduce one more project). (我不想再介绍一个项目)。
Look at your packaging for your EJB project. 查看您的EJB项目包装。 You should have 你应该有
<packaging>ejb</packaging>
This will allow you to run the EJB project on the server. 这将允许您在服务器上运行EJB项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.