如何在项目中同时产生jar和war [英] how to generate jar and war both in project

查看:61
本文介绍了如何在项目中同时产生jar和war的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有两个不同的项目.而且,在两个项目中,控制器几乎是相同的.

we have two different project . And and the controller is almost same in two project.

项目A内有控制器.因此发动战争不是问题.

project A has controller inside it. So generating war for it is not problem.

但是项目B需要项目A控制器的Controller jar.

But project B is requiring Controller's jar of project A controller.

有人能告诉我如何从项目A的控制器中生成可以在项目B中使用的jar文件吗?

Can any body tell me how can i generate the jar file from the controller of project A which i can use in project B?

推荐答案

此类问题的默认解决方案是有两个单独的模块,一个用于战争,一个用于控制器模块.不要开始与Maven打架.

The default solution for such thing is to have two separate modules one for the war and one for the controller module. Don't start fighting with Maven.

这篇关于如何在项目中同时产生jar和war的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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