什么时候应该在项目生命周期中使用mvn版本? [英] When should mvn release be used in the project lifecycle?

查看:284
本文介绍了什么时候应该在项目生命周期中使用mvn版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

澄清问题:


  • 我正在寻找既定的最佳做法或对已知做法进行比较分析

  • 按项目生命周期我的意思是:部署到预集成,集成,QA,preprod和prod环境。

对于某些上下文:
我们的项目每周部署到集成和QA,当前我们为每个集成部署创建一个新版本,但这感觉不对。它导致每周更新所有poms,破坏开发级别的依赖关系,迫使每个开发人员刷新他们的eclipse配置。我们有大型的工作空间,eclipse不能很好地处理刷新,因此浪费了很多时间。

For some context: Our project deploys to integration and QA every week, currenlty we create a new release for each integration deployment, but this doesn't feel right. It leads to updating all the poms every week breaking dev level dependencies, forcing every dev to do a refresh of their eclipse configurations. We have large workspaces and eclipse doesn't handle the refreshes so well thus a lot of wasted time.

我对maven发布惯例并不太熟悉,而且一直无法使用找到关于应该使用mvn版本时应用程序生命周期点的那些。

I am not overly familiar with the maven release conventions and have been unable to find the ones regarding the point of the application lifecycle when mvn release should be used.

如果我们现在使用的模式被接受/正确/建立,我将有另一个问题:)

If the pattern we use now is accepted/correct/established I will have another question :)

推荐答案

我用来避免Eclipse dev级别依赖性更新问题的方法是保留相关的trunk或分支版本号在发布变得重要之前不变。通过这种方式,您可以为QA等提供正确的标记/版本化版本,以便您可以追踪问题但不需要开发人员更新依赖关系。为实现此目的,我使用以下命令,但覆盖版本号以获取所需的版本号,但重新输入当前快照版本作为新快照版本:

The approach I use to avoid the Eclipse dev level dependency update issue is to leave the relevant trunk or branch version number unchanged until such time as the release becomes significant. This way you can have properly tagged/versioned releases to QA etc so that you can track issues back but not require devs to update dependencies. To achieve this I use the following command but override the version numbers to get the desired release number but re-enter the current snapshot version as the new snapshot version:

mvn release :prepare -DautoVersionSubmodules = true

mvn release:prepare -DautoVersionSubmodules=true

PS我有一个图表来说明这一点,但不幸的是,在这个论坛中没有足够的权利来附加它。我很乐意提供它,如果有人可以帮助附加。

P.S. I have a diagram that demonstrates this but unfortunately insufficient rights in this forum to attach it. I would happily provide it if someone can facilitate attaching.

PPS也许现在......

P.P.S Maybe now...

还请注意对早期分支的支持( 2.1)和晚期分支(2.2)。

Note also the support for early branching (2.1) and late branching (2.2).

这篇关于什么时候应该在项目生命周期中使用mvn版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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