具有WTP的多模块Maven2项目 [英] Multi Module Maven2 Project with WTP
问题描述
我很难使具有深层项目结构的Maven2多模块项目显示为单耳(带有其依赖项-包括1个war,2个ejbs和1个jar),并将其部署到我的系统中我的Eclipse Ganymede内的JBOSS 5服务器(选项卡服务器).
I'm having a hard time to make my Maven2 multi module project, with a deep project structure, appear as a single ear (with its dependencies - which includes 1 war, 2 ejbs and 1 jar) to be deployed in my JBOSS 5 server inside my Eclipse Ganymede (tab Servers).
我一直在尝试使用Maven Eclipse插件将我的项目转换为WTP项目,但没有成功.因此,它们似乎已部署在服务器中,并显示为单独的项目.
I've been trying to use Maven Eclipse Plugin to turn my projects into a WTP project without success. Therefore they appear to be deployed in the server they appear as separated projets.
我的项目有1个war,2个ejbs和1个jar,必须包装在耳朵内,每个子项目"都是一个单独的模块.
My project has 1 war, 2 ejbs and 1 jar that must be packaged inside an ear, each of the "subprojects" is a separate module.
项目的pom.xml(类型为pom):
Project's pom.xml (type pom):
...
<modules>
<module>ejb1</module>
<module>ejb2</module>
<module>war</module>
<module>jar</module>
<module>ear</module>
</modules>
...
耳朵模块只负责将其他模块包装在一起.
The ear module is only responsable to pack the other modules together.
有没有办法告诉eclipse(ganymede)所有这些项目(ejbs,war和jar)都在ear模块内部,这样我就可以在服务器中部署ear了.
Is there a way to tell eclipse (ganymede) that all those projects (ejbs, war and jar) are inside the ear module so I can deploy the ear in the server?
推荐答案
您要做的是让maven通过mvn eclipse创建eclipse项目:eclipse
What you want to do is have maven create the eclipse projects via mvn eclipse:eclipse This might be helpful.
这篇关于具有WTP的多模块Maven2项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!