Write how to specify the character code of the source when building with Maven. If you do not specify the character code of the source when building with Maven, the following Warning will be displayed.
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
Add the following to pom.xml (when UTF-8 is specified).
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
The hierarchy is as follows.
<project>
...
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
...
</project>
Maven – Frequently Asked Technical Questions
Recommended Posts