其他分享
首页 > 其他分享> > maven 字符编码设置

maven 字符编码设置

作者:互联网

本地安装maven,查看:maven -v

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
Maven home: D:\my\tools\apache-maven-3.3.9\bin\..
Java version: 11.0.2, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk-11.0.2
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"

 

解决:添加系统环境变量:

MAVEN_OPTS

-Xms256m -Xmx512m -Dfile.encoding=UTF-8

查看maven编码

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
Maven home: D:\my\tools\apache-maven-3.3.9\bin\..
Java version: 11.0.2, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk-11.0.2
Default locale: zh_CN, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"

标签:编码,Java,字符,11.0,maven,3.3,home,Maven
来源: https://www.cnblogs.com/ncyj/p/15230598.html