You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by youhaodeyi <yo...@gmail.com> on 2008/07/04 10:07:17 UTC

How to package test souce code?

I run mvn package only package the java code into a jar file. How can I
package the test code?
-- 
View this message in context: http://www.nabble.com/How-to-package-test-souce-code--tp18274870p18274870.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How to package test souce code?

Posted by Julien Simon <ka...@gmail.com>.
Hi,

You can use the maven-jar-plugin [1]  with the test-jar goal.
Or you can use the maven-assembly-plugin [2] .

If what you want to do is only to package the tests classes in a jar file,
run mvn jar:test-jar. If you want it to be done automatically in your build,
configure the plugin in your pom.

[1] http://maven.apache.org/plugins/maven-jar-plugin/test-jar-mojo.html
[2] http://maven.apache.org/plugins/maven-assembly-plugin/


Regards.