将 2 个 wicket Web 项目合并为 1 个多模块 Maven 项目
我创建了 2 个独立的 wicket Web 项目。现在我想将它们放在多模块 Maven 项目中,并根据需要放置依赖项。 当我有 web-inf 文件夹时会出现问题吗? 例子 项目 A 有 web-inf 项目 B 也有 web-inf。
现在我将项目“A”和“B”放入名为“C”的多模块maven项目中,并更改项目“B”的pom.xml,使其包含“A”的依赖项
最后我想部署“B”计划的战争。
谢谢
I have created 2 separate wicket web projects. Now i want put them together in multi-module maven project and put the dependency as required.
Will it give problem when i have have web-inf folders.
Example
Project A has web-inf
Project B also has web-inf.
Now i put both Project "A" and "B" into a multi-module maven Project named "C", and have the pom.xml of project "B" changed so it includes the dependency of "A"
Finally i want to deploy war of project "B".
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议创建另一个 Maven 模块“D”(带有 jar 包装),其中包含模块“A”和“B”之间的所有共享代码。
模块“A”需要依赖于“D”,模块“B”也需要依赖于“D”。
这种方法的好处是让两个 Web 项目(“A”、“B”)仍然能够部署到 Web 服务器,同时将它们之间共享的代码保留在一个位置(“D”)。
I recommend to create another Maven module "D" (with jar packaging) which would contain all the shared code between modules "A" and "B".
The module "A" will need to have a dependency on "D" and the module "B" will need to have a dependency on "D" as well.
The benefit of this approach is to have both web projects ("A", "B") still able to deploy to a web server while maintaining the code shared between them on one place ("D").