Bootstrap

Maven修改默认编码格式UTF-8

查看当前编码格式

cmd命令

C:\Users >mvn -v
Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Maven home: D:\develop\apache-maven-3.9.9
Java version: 1.8.0_421, vendor: Oracle Corporation, runtime: D:\develop\Java\jdk-1.8\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

修改编码格式

环境变量中新建
变量名 MAVEN_OPTS
变量值 -Xms256m -Xmx512m -Dfile.encoding=UTF-8
在这里插入图片描述

查看修改后编码

mvn -v
Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Maven home: D:\develop\apache-maven-3.9.9
Java version: 1.8.0_421, vendor: Oracle Corporation, runtime: D:\develop\Java\jdk-1.8\jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
;