如何将战争合二为一? [英] How to merge wars into one?

查看:141
本文介绍了如何将战争合二为一?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们公司,我们有许多不同的模块构建为单独的战争。
每个客户都可以挑选他想要购买的模块。
由于所有模块共享相同的会话,安全上下文等,因此将它们合并为单个战争是有意义的。

In our company, we have a number different modules constructed as separate wars. Each client can pick and choose module he wishes to buy. Since all modules share same session, security context etc, it makes sense to merge them into a single war.

是否可以自动执行此流程?例如,它应该合并web.xml,计算每个wars依赖项,复制像.jsp和.class等文件。顺便说一句,我们使用的是Maven,但是无法找到解决这个问题的方法。

Is it possible to automate this process? For example, it should merge web.xml, calculate each wars dependencies, copy files like .jsp and .class etc. By the way, we are using Maven, but were not able to find a solution to this problem.

推荐答案

当djna和ChssPly76提到的风险时,您可以通过使用 Maven WAR插件。这将要求您分离出servlet映射以确保您没有任何URL冲突等,但它可能会起作用。

Granted the risks mentioned by djna and ChssPly76, you may be able to achieve this by using overlays with the Maven WAR plugin. This will require you to separate out servlet mappings to ensure you don't have any URL collisions and the like, but it might do the trick.

基本上,您创建一个具有多个WAR依赖项的模块,并使用该插件将它们合并为一个新的。

Basically, you create a module with multiple WAR dependencies and use the plugin to merge them into a new one.

这篇关于如何将战争合二为一?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆