生成测试包以及测试包中的jar文件 [英] Generate test-jar along with jar file in test package
本文介绍了生成测试包以及测试包中的jar文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将测试包打包到jar文件中.如何从Maven插件Surefire执行生成测试罐.
I want to package my test package to jar file . How to execute generate test-jar from maven plugin Surefire.
推荐答案
您可以在pom中添加以下条目:
You can add following entries to your pom:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
这篇关于生成测试包以及测试包中的jar文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文