Package org.apache.maven.plugins.jar
Class TestJarMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugins.jar.AbstractJarMojo
org.apache.maven.plugins.jar.TestJarMojo
- All Implemented Interfaces:
- org.apache.maven.plugin.ContextEnabled,- org.apache.maven.plugin.Mojo
@Mojo(name="test-jar",
      defaultPhase=PACKAGE,
      requiresProject=true,
      threadSafe=true,
      requiresDependencyResolution=TEST)
public class TestJarMojo
extends AbstractJarMojo
Build a JAR of the test classes for the current project.
- Version:
- $Id$
- Author:
- Emmanuel Venisse
- 
Field SummaryFields inherited from interface org.apache.maven.plugin.MojoROLE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidexecute()Generates the JAR.protected FileReturn the specific output directory to serve as the root for the archive.protected StringOverload this to produce a jar with another classifier, for example a test-jar.protected StringgetType()Overload this to produce a test-jar, for example.Methods inherited from class org.apache.maven.plugins.jar.AbstractJarMojocreateArchive, getJarFile, getProject, hasClassifierMethods inherited from class org.apache.maven.plugin.AbstractMojogetLog, getPluginContext, setLog, setPluginContext
- 
Constructor Details- 
TestJarMojopublic TestJarMojo()
 
- 
- 
Method Details- 
getClassifierOverload this to produce a jar with another classifier, for example a test-jar.- Specified by:
- getClassifierin class- AbstractJarMojo
- Returns:
- get the classifier.
 
- 
getTypeOverload this to produce a test-jar, for example.- Specified by:
- getTypein class- AbstractJarMojo
- Returns:
- return the type.
 
- 
getClassesDirectoryReturn the specific output directory to serve as the root for the archive.- Specified by:
- getClassesDirectoryin class- AbstractJarMojo
- Returns:
- get classes directory.
 
- 
executepublic void execute() throws org.apache.maven.plugin.MojoExecutionExceptionGenerates the JAR.- Specified by:
- executein interface- org.apache.maven.plugin.Mojo
- Overrides:
- executein class- AbstractJarMojo
- Throws:
- org.apache.maven.plugin.MojoExecutionException- in case of an error.
 
 
-