'Maven change encoding to certain files
All my project with a Cp1252 encoding, except for a couple of files that I have encoded in UTF-8, which contain special characters.
When I run an install, in those files I get a couple of errors: unclosed character literal, illegal character: '\u00a8'. When doing the install with the plugin with the encoding in UTF8:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
The error is no longer displayed in the above mentioned files but in many others, the error displayed is: unmappable character for encoding UTF-8.
Can I specify UTF-8 encoding only for some files?
Another thing, maven displays errors as follows:
folder/file.java:[10,19] unclosed character literal
folder/file.java:[10,22] unclosed character literal
folder/file.java:[13,19] unclosed character literal
What the numbers means? it does not seem to be the line numbers where the error is located.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
