Maven多模块项目发布管理
我有一个 Maven 项目,如下所示:
- enterprise-pom
- commons
- core
- domain
- dao
- search
- importer-batch-app
- processor-batch-app
- systems
- server-system
- client-system
core 依赖于 enterprise-pom 和 common。
我刚刚致力于发布 3.0.0 核心,方法是:
Release 3.0.0 of enterprise-pom
Release 3.0.0 of commons
Release 3.0.0 of core
所有这些都位于 3.0.1-SNAPSHOT,并且在 SVN 中为 3.0.0 创建了一个标签。
我们不想发布系统。所以它仍然是 3.0.0-SNAPSHOT。
问题:
我是否应该手动将 systems pom 更改为 3.0.1-SNAPSHOT 而不释放它(因为它根本不会被使用)?
该系统取决于核心。目前,依赖关系仍为 3.0.0-SNAPSHOT。应该更新成什么?
I have a Maven project that looks like the following:
- enterprise-pom
- commons
- core
- domain
- dao
- search
- importer-batch-app
- processor-batch-app
- systems
- server-system
- client-system
core depends on enterprise-pom and common.
I just worked on releasing 3.0.0 of core, by doing:
Release 3.0.0 of enterprise-pom
Release 3.0.0 of commons
Release 3.0.0 of core
All of these are at 3.0.1-SNAPSHOT and there's a tag created for 3.0.0 in SVN.
We did not want to release systems. So it's still on 3.0.0-SNAPSHOT.
Question:
Should i manually just change the systems pom to 3.0.1-SNAPSHOT without releasing it(as it's not going to be used at all)?
The systems depends on core. and the dependency is still at 3.0.0-SNAPSHOT, currently. What should that update to?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通常答案是:这取决于情况。
系统版本号:
如果您计划一起发布所有版本,您可能应该更改版本号,因为一个发布过程中的所有内容都应该具有相同的版本(不是强制性的,但在某种程度上是默认的)。
如果子模块具有或将具有不同的发布周期,请不要手动更改它。
系统依赖性:
如果您的开发人员在 IDE 中一次性打开所有内容,您应该手动将依赖性调整为 3.0.1-SNAPSHOT,以免让他们感到困惑。
如果他们逐个子项目打开子项目,您应该将依赖项更改为已发布版本 3.0.0,并像任何其他第 3 方库一样处理它。
如果基本上所有内容都有相同的发布周期,但现在您不想公开提供系统工件,您也可以关闭这些工件的部署:
然后一起发布
As so often the answer is: it depends.
System's version number:
If you ever plan to release all together you probably should change the version number since everything in one release process should have the same version (not mandatory but somehow default).
If the sub modules have and will have different release cycles don't change it manually.
System's dependency:
if your developers open everything at once in their IDE you should manually adjust the dependency to 3.0.1-SNAPSHOT not to confuse them.
If they open sub-project by sub-project you should change the dependency to the released version 3.0.0 and handle it just as any other 3rd party lib.
In case essentially everything has the same release cycle but for now you don't want to make the system artifacts publicly available you could also turn off the deployment of these artifacts:
and just release all together