Maven EAR 构建中的 2 个 WAR
我对 Maven 很陌生,事实上,我对构建工具和流程也很陌生,或者我应该说整个 Web 结构。我有一个小问题需要帮助。
我将制作一个网络项目,在编译/部署时将提供一个 war 文件。我有一个单独的项目,其中的战争(只是捆绑项目后的战争文件)文件将提供给我。
现在我的要求是制作一个 EAR 文件,其中包含我的项目包,还包括其他已完成项目的战争。我需要为此使用 Maven。
我知道可以使用 Maven 创建多模块项目。但我不确定它将如何处理孤立的战争文件。我的意思是,对于我的项目,它将具有整个结构、artifactId 和 groupId。那么另一场战争又将如何处理呢?
我知道这可能是一个新手问题。但有人可以帮忙吗?
谢谢
I am new to maven and as a matter of fact new to the build tools and process or should i say the whole web structure. I have a slight problem for which i need help.
I am going to make a web project which on compiling/deployment will give a war file. And i have a separate project for which the war(just the war file after bundling the project) file will be given to me.
Now my requirement is to make a EAR file comprising both my project bundle and also including the war of the other completed project. I need to use maven for this.
I know the multi-module projects can be created using maven. But i am not sure how it will handle isolated war file. I mean for my project it will have the whole structure , artifactId and groupId. What about the other war how will it be handled.
I know this may be a novice question. But can someone please help.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通常处理这种情况的方法是使隔离的 WAR 文件成为依赖项。将其安装到本地 Maven 存储库中,然后将其列为 EAR 模块的 POM 依赖项。另外,将 WAR 项目作为 EAR 项目下的模块可以处理您实际构建的 WAR。
The way this would typically be handled would be making the isolated WAR file a dependency. Install it in your local maven repo and just list it as a dependency in the POM for your EAR module. Also, making your WAR project a module under your EAR project would handle the WAR that you're actually building.