分叉的Maven项目使用什么版本标签? [英] What version label to use for a forked maven project?

查看:61
本文介绍了分叉的Maven项目使用什么版本标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我经常不得不叉一个使用Maven的Java项目(通常在github上).

I often times have to fork a Java project that uses Maven (usually on github).

当我分叉项目并进行更改时,我通常希望将发布发布到我自己的私有(但在Internet上)Maven存储库中.

When I fork the project and make my changes I generally want to cut a release to my own private (but on the internet) maven repository.

因此,我的自定义发行版的版本标签应该是什么的问题.我无法执行SNAPSHOT,因为我需要将其发布.有时我在项目后缀.ADAMGENT(因为我是自恋者).可以说我分叉了1.0.4-SNAPSHOT.我可能将其更改为1.0.4.ADAMGENT.我不知道那是否是个好主意.在某些情况下,我什至不能在.ADAMGENT后缀,因为Spring的Gradle构建工具不喜欢这样.因此,对于Spring项目,如果具有里程碑意义,我会执行.ADAMGENT.RELEASE.ADAMGENT.M1.

Thus the question of what the version label should be for my custom release. I can't do SNAPSHOT as I need it to be a release. Sometimes I suffix the project with .ADAMGENT (cause I'm a narcissist). Lets say I fork 1.0.4-SNAPSHOT. I might change it to 1.0.4.ADAMGENT . I have no idea if that is a good idea. In some cases I can't even suffix it with .ADAMGENT as Spring's Gradle build tools don't like that. So for Spring projects I do .ADAMGENT.RELEASE or .ADAMGENT.M1 if its a milestone.

其他人做什么?

更新: 尽管我说过分叉我还提到了补丁级别的变化.另一方面,(由其他用户获得的)赏金可能是用于fork和/或补丁

推荐答案

我通常添加一个后缀(例如名称),然后添加一个运行编号,以避免混淆基于上游版本发布的多个版本.在您的设置中,这可能会转换为以下内容:

I usually add a suffix (e.g. name) and then a running number to avoid confusing multiple releases that I make based on the upstream version. In your setup, this would probably translate to the something like this:

1.0.4-ADAMGENT-1

,然后再按1.0.4-ADAMGENT-2,以防万一您需要进行其他更改.

which would then be followed by 1.0.4-ADAMGENT-2 in case you have to make another change.

绝对保留原始项目中的artifactgroup ID,以及您要基于其进行更改的版本,以后,如果您必须找出所使用的版本,它将很方便正在努力.如果您的更改包含在上游,则可以更轻松地切换到正式版本.

Definitely keep the artifact and group ID from the original project and also the version you're basing your changes on, this will come in handy later, if you ever have to find out which version you've been working on. And it makes switching to the official version easier, if your changes are included upstream.

这篇关于分叉的Maven项目使用什么版本标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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