maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Kolotyluk <eric.koloty...@gmail.com>
Subject Re: UTF-8 Test Mystery
Date Mon, 10 Oct 2011 23:47:11 GMT
Actually - that helped - but it's not a stable solution. For some reason 
the tests pass when run from m2e, but fail when run from the command 
line. I'm still trying to figure out what the difference is.

Cheers, Eric

On 2011-10-10 4:41 PM, Kalle Korhonen wrote:
> A whole case? I *love* inflation.
>
> Kalle
>
>
> 2011/10/10 Eric Kolotyluk<eric.kolotyluk@gmail.com>:
>> Awesome Kalle - thanks.
>>
>> Where should I send the case of beer?
>>
>> Cheers, Eric
>>
>> On 2011-10-10 4:00 PM, Kalle Korhonen wrote:
>>> How are you reading in your properties files? By default, latin-1 is
>>> assumed. Configure your surefire JVM to read files as UTF-8 with:
>>> <argLine>-Xms256m -Xmx512m -XX:MaxPermSize=128m -ea
>>> -Dfile.encoding=UTF-8</argLine>
>>>
>>> Kalle
>>>
>>>
>>> On Mon, Oct 10, 2011 at 3:04 PM, Eric Kolotyluk
>>> <eric.kolotyluk@gmail.com>    wrote:
>>>> I am having trouble understanding a mystery.
>>>>
>>>> I have code that checks my .properties file to make sure that it has not
>>>> been corrupted after being edited by a non UTF-8 editor. In particular I
>>>> have a property called lambda = λ and I check to see that it actually
>>>> does
>>>> resolve to the correct character.
>>>>
>>>> If I run my code from main (my manual unit test) it works. If I run my
>>>> test
>>>> from JUnit in Eclipse, it works. But when the same test runs under Maven
>>>> it
>>>> fails because lambda = ?
>>>>
>>>> When I look in the actual properties file that the test runs with, lambda
>>>> =
>>>> λ, but somehow when the code runs it gets lambda = ?.
>>>>
>>>> I thought this was maybe a surefire configuration problems so I am using
>>>>
>>>> <pluginManagement>
>>>> <plugins>
>>>> <plugin>
>>>> <groupId>org.apache.maven.plugins</groupId>
>>>> <artifactId>maven-surefire-plugin</artifactId>
>>>> <version>2.9</version>
>>>> <configuration>
>>>> <junitArtifactName>junit:junit</junitArtifactName>
>>>> <encoding>UTF-8</encoding>
>>>> <inputEncoding>UTF-8</inputEncoding>
>>>> <outputEncoding>UTF-8</outputEncoding>
>>>> <argLine>-Xms256m -Xmx512m -XX:MaxPermSize=128m -ea</argLine>
>>>> </configuration>
>>>> </plugin>
>>>> </plugins>
>>>> </pluginManagement>
>>>>
>>>> but this makes no difference. Does anyone have any idea why my JUnit test
>>>> fails running under surefire, but not running under Eclipse?
>>>>
>>>> Cheers, Eric
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message