`
lijunaccp
  • 浏览: 153339 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

maven3使用junit4时需指定org.apache.maven.surefire为surefire-junit47

阅读更多
maven3使用junit4时需指定
org.apache.maven.surefire为surefire-junit47,不然会报如下异常:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project xxx: There are test failures.


在apache官网对此插件有详细的说明:
http://maven.apache.org/plugins/maven-surefire-plugin/examples/junit.html

pom.xml中的配置如下:

<build>
  	<plugins>
  	  <plugin>
	    <groupId>org.apache.maven.plugins</groupId>
	    <artifactId>maven-surefire-plugin</artifactId>
	    <version>2.12</version>
	    <dependencies>
	      <dependency>
	        <groupId>org.apache.maven.surefire</groupId>
	        <artifactId>surefire-junit47</artifactId>
	        <version>2.12</version>
	      </dependency>
	    </dependencies>
 	  </plugin>
  	</plugins>
  </build>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics