maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <>
Subject Re: maven-surefire-plugin and default locale
Date Mon, 01 Jun 2009 01:21:46 GMT
On 23/04/2009, Jon BrĂ¥ten <> wrote:
> Is there a way to set the default locale to be used in JUnit tests run by
>  maven-surefire-plugin? I've tried adding "-Duser.language=nn" and
>  "" to the maven command issued, but is does not affect the
>  test runs.
>  The issue at hand is, ofcourse, tests failing due to formatting variations
>  in amounts and alike. It can be discussed wether these tests are useful, and
>  either way its an alternative to hardcode the locale in the tests
>  themselves. But still, I'm curious as to why surefire appears to ignore the
>  locale specified at command line :)
>  Anyone?

I think that is because Maven runs the tests in a separate (forked)
process by default, so the properties are lost.


Try adding -DforkMode=none and see it that helps.

Otherwise see:

which describes how to define system properties in the POM.

>  Regards,
>  Jon B

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message