如何在 Eclipse 或 Netbeans 中配置 Maven 多模块项目以减少部署时间
我有以下项目结构
- project-parent:所有父配置都在这里
- project-ear:从ejb,war和核心项目组装ear文件
- project-ejb:EJB模块依赖于核心
- project-war:Web模块依赖于EJB和核心
- 项目核心:没有依赖项,
我能够使用 Eclipse 或 Netbeans 并将项目从 IDE 部署到 glassfish。但我想要的是,每当我对 webmodule 进行更改时,我希望它能够自动部署。这样我就可以刷新浏览器并看到更改。
预先感谢您的帮助
I have the following project structure
- project-parent: All the parent configuration is here
- project-ear: Assemblying the ear file from the ejb, war and core projects
- project-ejb: EJB module depends on core
- project-war: Web module depends on EJB and core
- project-core: no dependencies
I was able to use able to use Eclipse or Netbeans and deploy the project from the IDE to glassfish. But what I want is whenever I make changes to the webmodule I want it to be deployed automatically. So that I refresh the browser and see the changes.
Thanks in advance for your help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定您的问题到底是什么(当我将 GFv3 与 Eclipse 和 NetBeans 一起使用时,热部署对我来说效果很好)。也许澄清一下。
以防万一,如果您需要运行 Maven 构建但不想启动完整反应器构建,可以考虑使用高级反应器选项(更准确地说
-pl
调用mvn
时使用-am
指定特定项目来构建指定项目所依赖的所有项目)。请参阅博客文章 Maven 提示和技巧:高级反应器选项了解更多详细信息。I'm not sure what your problem exactly is (hot deployment works fine for me when using GFv3 with both Eclipse and NetBeans). Maybe clarify.
Just in case, if you need to run a maven build but don't want to start a full reactor build, maybe consider using the advanced reactor options (more precisely
-pl
to specify a specific project with-am
to build all of the projects that the specified project depends upon) when callingmvn
. See the blog post Maven Tips and Tricks: Advanced Reactor Options for more details.