commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject [ALL] Testing with a different Locale - Surefire argLine override
Date Mon, 24 Sep 2012 00:25:34 GMT
Found this out when testing LANG DateUtils; it might be of use to others:

Surefire accepts an "argLine" command-line property, which is applied
to the JVM before it is started.
This allows for an easy override of the Locale, for example:

mvn test -Dtest=DateUtilsTest -DargLine="-Duser.language=de -Duser.country=DE"

This will change the default Locale to de_DE.

Note: if Surefire is configured to run using the Maven JVM instance
then of course this won't work, but AFAICT that is not the case for
Commons POMs.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message