sample plugin declaration from pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
and the test-jar configuration from components.xml
<component>
<role>org.apache.maven.artifact.handler.ArtifactHandler</role>
<role-hint>test-jar</role-hint>
<implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
<configuration>
<classifier>tests</classifier>
<extension>jar</extension>
<type>test-jar</type>
<packaging>jar</packaging>
<language>java</language>
<addedToClasspath>true</addedToClasspath>
</configuration>
</component>
HTH
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business
of Sender. This transmission is of a confidential nature and Sender does not
endorse distribution to any party other than intended recipient. Sender does
not necessarily endorse content contained within this transmission.
> Date: Mon, 2 Jun 2008 14:18:15 +0200
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: Re: How can I package test code?
>
> youhaodeyi schrieb:
> > mvn package only packages source code into a jar file. I want to package the
> > test code into a jar file too. How can I do this?
> >
>
> See the documentation for maven-jar-plugin, goal "test-jar"
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
_________________________________________________________________
Keep your kids safer online with Windows Live Family Safety.
http://www.windowslive.com/family_safety/overview.html?ocid=TXT_TAGLM_WL_Refresh_family_safety_052008