Testng results报告出现中文乱码和更新maven出现报错现象实战解决
1、Testng results报告出现中文乱码
解决方法:
1)、先确认eclipse 的workspace设置是否为utf-8;路径:Windows-->Preferences-->Genereal-->Workspace-->Text file endcoding: other-->UTF-8,点击保存。
2)、修改eclipse.ini 文件,文件末尾添加: -Dfile.encoding=UTF-8,保存之后最后重新启动eclipse,以确保eclipse.ini 修改生效。
2、更新Maven项目 update project出现报错
使用-maven-surefire-plugin插件
在pom.xml配置文件中加入如下语句:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>