模块化Maven-Spring项目困境 [英] Modularized Maven-Spring Project Dilemma

查看:102
本文介绍了模块化Maven-Spring项目困境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为一个大型组织工作,我们提出了一个大型应用程序(网络).

I work for a big organization and we came up with a big application (web).

我们从一个很小的应用程序开始,但现在变成了一大堆具有3个接口的Java代码.

We started from a very small application but now it turned into a big heap of java code which has 3 interfaces.

  1. 前端
  2. 管理面板
  3. 博客部分.

到目前为止,我们在一个项目中通过制作不同的软件包来完成所有这些工作,但是现在我们希望,如果删除了任何一个部分,则应用程序的功能应保持不变.

Till now, we were doing all that in one project by making different packages, but now we want that if one any one part is removed, the functionality of the application should remain intact.

我试图制作基于Maven的模块并将代码分成这些模块,但最终在核心模块内创建了目录.

I tried to make maven based modules and divide the code into them, but ended up creating directories inside the core module.

我们当前的目录结构是;

Our current directory structure is;

我们要创建类似这样的内容;

We want to create something like this;

编译后,这些模块应进入一个目录,即tomcat Web应用程序文件夹.

And when compiled, the modules should go into one directory, i.e, the tomcat web application folder.

这可以使用Maven插件来实现吗,还是我必须对我的等级做一些额外的修改?

Can this be achieved using the maven plugins or I have to do some extra amendments on my level?

我还需要合并他的web.xml文件.

I also nees the web.xml files to he merged.

推荐答案

我需要的是通过定义自定义MOJO来完成的.

What I required was accomplished by defining a custom MOJO.

该工具几乎完整,可以作为一个开源项目进行派生. ;)

The tool is almost complete and would be available to fork as an open source project. ;)

这篇关于模块化Maven-Spring项目困境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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