Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!

执行Maven Install打包的时候,提示以下警告信息:
[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!

解决方法:
打开项目属性》Resources,按下图修改。
Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!_第1张图片

保存后重新执行Maven Install 发现警告依然存在,原来是理解错误错误了,应该修改Maven的配置文件中关于编码的配置<encoding>utf-8</encoding>
完整示例:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <encoding>utf-8</encoding>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>

还是存在警告,原来是需要在<project>中添加<properties>标签:

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

你可能感兴趣的:(using,图,resources,encoding,platform)