简体   繁体   English

如何在eclipse中正确管理多个独立的maven项目版本控制

[英]How to properly manage multiple independent maven projects versioning in eclipse

This may be an easy answer for you but I've been spending lot of my time changing the project versions.这对您来说可能是一个简单的答案,但我一直在花费大量时间更改项目版本。 Here is my situation:这是我的情况:

I have 8 java spring projects in my eclipse workspace.我的 Eclipse 工作区中有 8 个 java spring 项目。 5 projects depend on the 3 other libraries.If I change the versioning of any of the three projects [which is quite often], I need to change the versions all the 5 project pom.xml files. 5 个项目依赖于其他 3 个库。如果我更改三个项目中任何一个的版本控制 [这很常见],我需要更改所有 5 个项目 pom.xml 文件的版本。 I found it very cumbersome.我发现它非常麻烦。 I tried changing the versioning of these 3 dependent projects to a constant value [eg latest], then my local set up is working fine but CI/CD doesn't change the next incremental version.我尝试将这 3 个相关项目的版本控制更改为恒定值 [例如最新],然后我的本地设置工作正常,但 CI/CD 不会更改下一个增量版本。

I'm pretty sure I'm not the only one who is facing this type of situation.我很确定我不是唯一一个面临这种情况的人。 Hoping someone can guide me on how to manage the versioning locally and in the CI/CD process.希望有人可以指导我如何在本地和 CI/CD 过程中管理版本。

Thank you for reading this!谢谢您阅读此篇!

1st solution: Put all eight projects into one multi-module project and build it together with the same version number第一种解决方案:将所有八个项目放在一个多模块项目中,并以相同的版本号一起构建

2nd solution: Do not change the versions so often, only if you publish everything as productive version to the outside world.第二种解决方案:不要经常更改版本,只有当您将所有内容作为生产版本发布到外界时。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM