Friday, March 16, 2012

Java Compilation error: unmappable character for encoding UTF-8

Some times we add java documentation & stuff through Eclipse or some text editor which might be causing a compilation error(unmappable character for encoding UTF-8). It can be solved using the <encoding> tag in the compiler plugin.

<!-- Configure the compiler defaults -->
<plugin>
<groupid>org.apache.maven.plugins</groupid>
<artifactid>maven-compiler-plugin</artifactid>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>Cp1252</encoding>
</configuration>
</plugin>

No comments:

Post a Comment