首页 > 代码库 > how to solve "[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!"

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

 

[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.

 

add following to pom.xml

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

 



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