如何使用maven从subversion获取修订号? [英] How to get revision number from subversion using maven?

查看:142
本文介绍了如何使用maven从subversion获取修订号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想把修改号码放在webapp的主页上,我该怎么用maven?

I'd like to put revision number on main page of webapp, how can i do that using maven?

P.S。它的两个部分问题,如何获取修订版本号以及如何将其写入项目中的选定文件。

P.S. Its two part question, how to get revision number and how to write it into selected file in the project.

推荐答案

号码插件是要走的路。一个如何使用它的例子如下:

The maven build number plugin is the way to go. An example of how to use it is here:

http://www.mojohaus.org/buildnumber-maven-plugin/usage.html

您将一起使用maven jar插件将SVN提交号打印到
清单。

You would use this together with the maven jar plugin to print the SVN commit number to your manifest.

这是比使用包含SVN提交号的文件更好的解决方案,因为这增加了比真正需要更多的移动部件。

This is a better solution than using a file that contains the SVN commit number, because that adds more moving parts than is really necessary.

这篇关于如何使用maven从subversion获取修订号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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