Maven + Mercurial(内部编号) [英] Maven + Mercurial for Build Numbers

查看:120
本文介绍了Maven + Mercurial(内部编号)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道如何将Mercurial版本ID放入我的Maven版本中(理想情况下,我希望在罐子和战争的清单中找到它).

I can't figure out how to get a Mercurial revision id put into my Maven build (ideally I would like it in the MANIFEST of my jars and war).

我能找到的最接近的解决方案是:

The closest solution I could find is:

mvn -DbuildNumber=`hg id -i`

对于Windows或我的Hudson服务器而言,这实际上是不可行的. 幸运的是,Hudson标记了我的建筑,但是如果这些建筑还标有Mercurial changset ID,我希望得到更多的保证.

Which won't really work for Windows or my Hudson server. Luckily Hudson tags my builds but I would like some more assurance if the builds were also tagged with the Mercurial changset id.

推荐答案

看看

Have a look at this previous question and the link from the accepted answer. Basically, you want to do the same thing except that you'll want to use the buildnumber:hgchangeset goal with Mercurial to get a changeset property with the content of hg id -i.

这篇关于Maven + Mercurial(内部编号)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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