[WARNING] File encoding has not been set

[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!



Saw this warning message when using failsafe maven plugin, found the fix after a little search.




In the pom file, add the following property inside the <properties> section.

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



Advertisements
[WARNING] File encoding has not been set

7 thoughts on “[WARNING] File encoding has not been set

  1. Chris Graham says:

    You might also wish to set the compiler’s encoding, as well as for the rest of the build:

    UTF-8
    UTF-8

  2. Chris Graham says:

    Er, that would be:

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s