症状如下:
解决方法:
1、进入 Jenkins -- Manage Jenkins -- System Configuration -- System -- Global properties 全局属性,勾选 Environment variables,点击 Add,Name 输入 LANG,Value 输入 zh_CN.UTF-8,保存
2、新增Windows 系统环境变量,变量:JAVA_TOOL_OPTIONS,值:-Dfile.encoding=UTF-8,保存
3、修改Jenkins 安装目录下的jenkins.xml 文件,在 <arguments> 标签代码中添加:-Dfile.encoding=UTF8,保存
修改后如下:
<arguments>-Xrs -Xmx256m -Dfile.encoding=UTF8 -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=8080 --webroot="%BASE%\war"</arguments>