How do I get maven to "stamp" a build number into a properties file

maven-2

Solution

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.

Problem

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?

Original source