1 问题现象 构建各种问号
2 检查各种配置 查看Jenkins的文件编码为 ANSI_X3.4-1968
然后直接执行mvn -v命令显示的也不是UTF-8
3 解决方案,直接在/etc/profile 添加配置 然后 source /etc/profile 环境变量
export JAVA_TOOL_OPTIONS="-Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8"
4 之后 mvn -v变成了UTF-8 再重启Tomcat