Comments on: Maven based configuration management with automatic build number https://technology.amis.nl/2007/11/14/maven-based-configurationmanagement-with-automatic-build-numbering/ Friends of Oracle and Java Sat, 01 Aug 2015 11:10:05 +0000 hourly 1 http://wordpress.org/?v=4.2.3 By: Stewart https://technology.amis.nl/2007/11/14/maven-based-configurationmanagement-with-automatic-build-numbering/#comment-5034 Mon, 24 Oct 2011 16:35:52 +0000 http://technology.amis.nl/blog/?p=2582#comment-5034 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 https://technology.amis.nl/2007/11/14/maven-based-configurationmanagement-with-automatic-build-numbering/#comment-5033 Fri, 14 Jan 2011 09:41:11 +0000 http://technology.amis.nl/blog/?p=2582#comment-5033 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 https://technology.amis.nl/2007/11/14/maven-based-configurationmanagement-with-automatic-build-numbering/#comment-5032 Mon, 24 Aug 2009 20:35:49 +0000 http://technology.amis.nl/blog/?p=2582#comment-5032 You also can use the timestamp plugin. Combined with the buildnumber pluigin you can generate these two values.

http://code.google.com/p/maven-timestamp-plugin/

]]>
By: Lui Gie https://technology.amis.nl/2007/11/14/maven-based-configurationmanagement-with-automatic-build-numbering/#comment-5031 Fri, 14 Aug 2009 10:17:59 +0000 http://technology.amis.nl/blog/?p=2582#comment-5031 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:

scm:svn:https://xxx/svn/zdip/dev/web/branches/3.0/
scm:svn:https://xxx/svn/zdip/dev/web/branches/3.0/

Plugin config:

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

timestamp
buildNumber

Any ideas would be appreciated.
Regards,
Lui Gie

]]>
By: Robbrecht van Amerongen https://technology.amis.nl/2007/11/14/maven-based-configurationmanagement-with-automatic-build-numbering/#comment-5030 Thu, 13 Aug 2009 05:52:50 +0000 http://technology.amis.nl/blog/?p=2582#comment-5030 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“.

Robbrecht

]]>
By: Peter Kahn https://technology.amis.nl/2007/11/14/maven-based-configurationmanagement-with-automatic-build-numbering/#comment-5029 Wed, 05 Aug 2009 16:32:39 +0000 http://technology.amis.nl/blog/?p=2582#comment-5029 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 https://technology.amis.nl/2007/11/14/maven-based-configurationmanagement-with-automatic-build-numbering/#comment-5028 Mon, 28 Jan 2008 08:52:00 +0000 http://technology.amis.nl/blog/?p=2582#comment-5028 Yes indeed, my personal site (http://www.hendrikse.name/) as well as my corporate site (http://www.it-essence.nl/) 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 https://technology.amis.nl/2007/11/14/maven-based-configurationmanagement-with-automatic-build-numbering/#comment-5027 Sun, 02 Dec 2007 20:11:43 +0000 http://technology.amis.nl/blog/?p=2582#comment-5027 Hi Zeger, thanks for your reaction!.
I have looked at your site. Am I right you have created your personal site (http://www.hendrikse.name/) with maven to? Nice work!

]]>
By: Zeger Hendrikse https://technology.amis.nl/2007/11/14/maven-based-configurationmanagement-with-automatic-build-numbering/#comment-5026 Mon, 26 Nov 2007 15:55:06 +0000 http://technology.amis.nl/blog/?p=2582#comment-5026 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!

]]>