Configure the maven-compiler-plugin to use the same character encoding that your source files are encoded in (e.g):
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source> <!-- jdk version -->
<target>1.8</target> <!-- jdk version -->
<encoding>UTF-8</encoding>
</configuration>
</plugin>
Many maven plugins will by default use the "project.build.sourceEncoding" property so setting this in your pom will cover most plugins.
<project>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
...
Not working for me.