How to get revision number from subversion using maven?

前端 未结 4 1314
一生所求
一生所求 2020-12-28 13:10

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

P.S. Its two part question, how to get revision number and how to write it in

4条回答
  •  [愿得一人]
    2020-12-28 13:41

    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

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

    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.

提交回复
热议问题