maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Hammar <and...@hammar.net>
Subject Re: Compiler encoding on SuSE Linux
Date Mon, 18 Oct 2010 20:54:34 GMT
Have you verified that all Java files involved are in fact using UTF-8 char
encoding (check on the machine where it fails!)? Check both source code and
test code files.
I don't think it's obvious that the are compiled with different encodings.
The problem could maybe be that they are retrieved from your scm (or stored
in the scm) with the wrong encoding.

/Anders

On Mon, Oct 18, 2010 at 22:30, Andreas Simon <Andreas.Simon@gmx.de> wrote:

> Thank you for your reply!
>
> On my developer machine is Ubuntu 10.04. Same result when running Oracle
> JDK 1.6.0u21.
>
>  What are you running on your developer machine? Can you run it with Oracle
>> JDK?
>>
>> Cheers,
>> Per Hedman
>>
>> On Mon, Oct 18, 2010 at 8:51 PM, Andreas Simon<Andreas.Simon@gmx.de>
>>  wrote:
>>
>>
>>> Hi all,
>>>
>>> I got a quite strange problem with my tests. I have 3 tests that shall
>>> control some messages for the user. These messages contain some German
>>> umlauts (ä, ö, ü and ß). On my Ubuntu developer machine the tests run
>>> fine.
>>> On my SuSE integration server the tests fail. The assertions fail with
>>> the
>>> following message:
>>>
>>>   expected:<...ü...>  but was:<...??...>
>>>
>>> Obviously, the test files and the tested file are compiled with different
>>> encodings.
>>>
>>> I have tried several settings with UTF-8,
>>>
>>> <build>
>>> <plugins>
>>> <plugin>
>>> <groupId>org.apache.maven.plugins</groupId>
>>> <artifactId>maven-compiler-plugin</artifactId>
>>> <version>2.3.2</version>
>>> <executions>
>>> <execution>
>>> <id>src-compile</id>
>>> <phase>compile</phase>
>>> <goals>
>>> <goal>compile</goal>
>>> </goals>
>>> <configuration>
>>> <source>1.5</source>
>>> <target>1.5</target>
>>> <encoding>UTF-8</encoding>
>>> <fork>true</fork>
>>> <inputEncoding>UTF-8</inputEncoding>
>>> <outputEncoding>UTF-8</outputEncoding>
>>> <argLine>-Dfile.encoding=utf8</argLine>
>>> </configuration>
>>> </execution>
>>> <execution>
>>> <id>default-compile</id>
>>> <phase>test-compile</phase>
>>> <goals>
>>> <goal>testCompile</goal>
>>> </goals>
>>> <configuration>
>>> <source>1.5</source>
>>> <target>1.5</target>
>>> <encoding>UTF-8</encoding>
>>> <fork>true</fork>
>>> <inputEncoding>UTF-8</inputEncoding>
>>> <outputEncoding>UTF-8</outputEncoding>
>>> <argLine>-Dfile.encoding=utf8</argLine>
>>> </configuration>
>>> </execution>
>>> </executions>
>>> <configuration>
>>> <source>1.5</source>
>>> <target>1.5</target>
>>> <encoding>UTF-8</encoding>
>>> <fork>true</fork>
>>> <inputEncoding>UTF-8</inputEncoding>
>>> <outputEncoding>UTF-8</outputEncoding>
>>> <argLine>-Dfile.encoding=utf8</argLine>
>>> </configuration>
>>> </plugin>
>>> </plugins>
>>> </build>
>>>
>>> <properties>
>>> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>>> <maven.compile.encoding>UTF-8</maven.compile.encoding>
>>> </properties>
>>>
>>> Some settings are redundant, but two are better than one. Any way, these
>>> settings don't apply to the compiling of the test files. I have searched
>>> some hours for similar problems, but I found no other solution. To be
>>> complete, my configuration:
>>>
>>>  SuSE 11.1
>>>  IBM JDK 1.5.0
>>>  Maven 2.2.1
>>>
>>>
>>> Thanks for any idea,
>>> Andreas
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message