I have a Java project and I'm using Apache Maven. All this time I was using Maven Java compiler plugin with parameters source=1.5 and target=1.5 defined in pom.xml file. Since I changed it to source=1.6 and target=1.6 I'm getting the following error:
XXXXXXXX.java:[54,27] unmappable character for encoding UTF-8
I've been testing different configurations and I turned showWarnings to value true so I could see that with value 1.5 for source and target this is a warning and not an error.
I need to change the Java compiler configuration anyway. Does anybody know why is this so and how can I solve this problem without editing all Java source files (there are hundreds of files with this issue now)?
My question is: why is this an error with source=1.6 and target=1.6 and it's a warning with source=1.5 and target=1.5?
Short anwser, because they said so:
-source 1.6 This is the default value. No language changes were introduced in Java SE 6. However, encoding errors in source files are now reported as errors, instead of warnings, as previously.
@DaveG concerns are valid, and you should try to:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With