JUnit测试是中文 maven test是乱码
2013-05-23 19:43
791 查看
pom文件的 <build> <plugins> 里加入
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.2</version>
<configuration>
<forkMode>once</forkMode>
<argLine>-Dfile.encoding=UTF-8</argLine>
<systemProperties>
<property>
<name>net.sourceforge.cobertura.datafile</name>
<value>target/cobertura/cobertura.ser</value>
</property>
</systemProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.2</version>
<configuration>
<forkMode>once</forkMode>
<argLine>-Dfile.encoding=UTF-8</argLine>
<systemProperties>
<property>
<name>net.sourceforge.cobertura.datafile</name>
<value>target/cobertura/cobertura.ser</value>
</property>
</systemProperties>
</configuration>
</plugin>
相关文章推荐
- eclipse-->run as --> maven test 中文乱码
- Maven运行JUnit测试之mvn test的默认行为
- Maven运行JUnit测试之mvn test的默认行为
- eclipse-->run as --> maven test 中文乱码
- junit或maven test中无法输出被测试类中log4j的调试信息的解决方案
- maven 打war包配置文件中的中文注释乱码
- tomcat6中文乱码解决过程及测试
- 基于JUnit使用PowerMock的Mockito扩展在Maven测试项目中的配置说明
- Junit+Selenium+Maven+SVN+Eclipse+AutoFrame全自动化测试实践实例(三)
- Maven 编译后 内存中中文数据乱码
- Maven+SpringMVC+Hibernate+ajax:用ajax传递json到前台中文出现问号乱码问题
- maven下载源代码,解决中文注释为乱码的问题
- JSP--读文本文件和中文字符乱码的测试
- Maven构建mybatis的Junit测试
- 解决maven以及eclipse的jar以及exe中文乱码问题
- Junit测试中找不到junit.framework.testcase
- 通过Junit和Spring-Test测试SpringMVC的web应用
- maven javadoc中文乱码问题和CheckStyle编码规范检测
- Maven项目中,xml配置文件中的中文注释乱码
- maven spring项目 使用junit测试,出现SpringJunit4Runner的问题