Specify encoding for Maven projects View article history Edit article

Published:
Talks about: , , , , and

In order to create Maven projects which can be build on platforms like Linux/Mac/Windows, make sure to specify the encoding of your source code and resource files like this:

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>