- Save file in UTF-8 format
- Tell Eclipse to use UTF-8:
Project properties -> Resource -> Text file enconding: "Other (UTF-8)"
- Tell Maven (pom.xml) to use UTF-8:
<properties>
<project.build.sourceEncoding>UTF-8 </project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>
</plugins>
</build>
For “project.build.sourceEncoding” see http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding