commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <>
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"

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:
For additional commands, e-mail:

View raw message