Comments on: Maven based configuration management with automatic build number Friends of Oracle and Java Sat, 01 Aug 2015 11:10:05 +0000 hourly 1 By: Stewart Mon, 24 Oct 2011 16:35:52 +0000 This is all well and good, but I can’t for the life of me get Maven to deploy the artifact to the snapshots repo with any other name than the default, timestamp-based name.
Any tips on how to do this?

By: Matteo Pelucco Fri, 14 Jan 2011 09:41:11 +0000 Great!
Thanks a lot, it worked at first glance!!
Just a remark: using freemarker, I have a lot of ${…} in my template files.. so, if I need to do some replacements, I need to put my ${buildNumber} at the beginning of the file; otherwise, at first $ token, maven tries to replace and fails, so skip the rest of the file.
Best would be to use @..@ as separator.
Anyway, good tutorial!

By: Robbrecht van Amerongen Mon, 24 Aug 2009 20:35:49 +0000 You also can use the timestamp plugin. Combined with the buildnumber pluigin you can generate these two values.

By: Lui Gie Fri, 14 Aug 2009 10:17:59 +0000 Thanks for this very nice and helpfull tutorial!

I managed to add the plugin to my project, but I have a problem with displaying the revision number from my svn repository together with the date of the last (local) build. When I use the default configuration, [buildNumber] indeed points to the right revision number, but when I configure the plugin by myself, it is being replaced by the number of local builds. It looks like I need to point somewhere that I want the revision number retrieved by scm…

My pom.xml:


Plugin config:

Rev: {1,number} Build date: {0,date,dd-MM-yyyy HH:mm:ss}


Any ideas would be appreciated.
Lui Gie

By: Robbrecht van Amerongen Thu, 13 Aug 2009 05:52:50 +0000 Peter,

I should not include the buildnumber in your project version. This number is set when releasing the project (with e.g .maven release plugin).
I would advise you to include the buildnumber somewhere visible in your application (name of the artifact (war/ear) and visible on the login screen. This is especially helpful when you are working with frequent releases of snapshot versions. Using this number always provides you (and e.g. your testers) with information about the version of the application they are looking at.

When you get “${buildNumber}” instead of a buildnumber it is possible that you forgot to link the buildnumber plugin to a project pahse. See the first block of code where it states “validate“.


By: Peter Kahn Wed, 05 Aug 2009 16:32:39 +0000 Thanks, That’s a good example. I’d like to have this set the project version so the deployed POM and artifact name have my chosen format of date or an svn revision. The packaged artifact looks good, but when its installed into my local repository the buildNumber isn’t resolved and I get “${buildNumber}” instead of 456.

Is it possible or wise to have the buildNumber included in the project version? Or should those be separate for a reason?

Thanks again.

By: Zeger Hendrikse Mon, 28 Jan 2008 08:52:00 +0000 Yes indeed, my personal site ( as well as my corporate site ( are built with Maven. This has the advantage of having multi-language support, having your sources in CVS and last but not least, continuous integration: at most ten minutes after committing a modification to my site, it is automatically deployed on the server!

By: Robbrecht van Amerongen Sun, 02 Dec 2007 20:11:43 +0000 Hi Zeger, thanks for your reaction!.
I have looked at your site. Am I right you have created your personal site ( with maven to? Nice work!

By: Zeger Hendrikse Mon, 26 Nov 2007 15:55:06 +0000 Very interesting indeed. It does precisely what I did with Ant scripts (see Having a time stamp of your Maven build available in your web application on my own technical blog) and even more. From now on I can use the version numbers in a standard way. Thanks for this clear explanation!