报错:maven编译出现File encoding has not been set

maven打包编译时后台一直输出警告信息

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

解决方法:在pom.xml文件中增加一个配置项,再次编译时即可消除警告

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

 

posted @ 2016-08-25 12:23  Faded  阅读(1904)  评论(0编辑  收藏  举报