Locales vs. consistent builds

In General on 2008-07-31 by Jukka Zitting Tagged: , ,

[MOJO-1193] Locale support for formatting dates and times

I wanted to use the Maven buildnumber plugin to generate a date string like “31-Jul-2008” for inclusion in an automatically generated release notes document. This way I could minimize the amount of manual tweaking I need to do when publishing the release.

This was easy enough (though quite verbose) to achieve:


Unfortunately, the resulting date string would be the expected “31-Jul-2008” on one computer, but “31-heinä-2008” (in Finnish) on my laptop. Instead of changing the settings of my laptop I wanted to explicitly set the locale that the buildnumber plugin should use when formatting the date. I wasn’t too surprised that the required functionality didn’t yet exist (it’s quite common for people to forget about locales), but luckily it wasn’t too hard to add. Thus MOJO-1193.

With my patch the required configuration becomes:


Consistency is good.


3 Responses to “Locales vs. consistent builds”

  1. I’d argue that in this case, an ISO-8601 date format (which is locale-independant) would have been the better choice anway :-)

  2. Agreed. Unfortunately I was following an existing template, and changing the technology was easier than figuring out how set in stone the template is. ;-)

  3. I see. I expected there was a good reason :-)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: