tags:

views:

844

answers:

3

I would like to be able to, as part of a maven build, set the build number (doesn't matter exactly what) in a properties file/class (so I can show it in a UI). Any ideas?

+5  A: 

We used the Build Number Plugin now available from Codehaus. It can generate a sequential build number or allows you to use the time stamp.

bmatthews68
+1  A: 

The Maven build number plugin should do what you want.

mdb
A: 

I use the maven-property-plugin to store the CruiseControl build label in a properties file (the build label is is available as a system property named 'label').

A post on how to do this with Hudson.