为什么以及何时创建多模块Maven项目? [英] Why and when to create a multi-module Maven project?

查看:72
本文介绍了为什么以及何时创建多模块Maven项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Maven的多模块项目有一个一般性的问题.什么时候以及为什么要这么做?

I have a general question about Maven's multi module project. When and why to go for it?

推荐答案

@Esko Luontola的答案

The answer of @Esko Luontola

将项目分为多个模块非常有用,例如 这些模块需要单独部署..

Splitting the project into multiple modules is useful for example if the modules need to be deployed separately,..

可能会被误解.如果您有将单独部署的模块,则完全相反.在这种情况下,您永远不要创建多模块构建.这应该通过简单的单独的Maven项目来完成.

could be misinterpreted. If you have modules which will be deployed separately, it's exactly the opposite. In such case, you should never create a multi-module build. This should be done via simple separate maven projects.

多模块构建的想法是,如果您有像耳朵项目一样属于一起的模块,这些项目通常由客户端,服务器,ejb,war等其他几个组件组成.这通常是通过多模块构建来处理的这意味着所有模块都具有相同的版本号,但其他模块可以单独访问和使用.

The idea of a multi-module build is if you have modules which belong together like an ear project which usually consists of several others like client, server, ejb, war, etc. This is usually handled via a multi-module build which means all modules have the same version number but can be accessed and used by other separately.

这篇关于为什么以及何时创建多模块Maven项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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