org.apache.maven.plugin.jar
Class TestJarMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugin.jar.AbstractJarMojo
org.apache.maven.plugin.jar.TestJarMojo
- All Implemented Interfaces:
- org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
public class TestJarMojo
- extends AbstractJarMojo
Build a JAR of the test classes for the current project.
- Version:
- $Id: TestJarMojo.java 1158941 2011-08-17 22:22:17Z rfscholte $
- Author:
- Emmanuel Venisse
- Is defined by the goal name:
- test-jar
- Is bound to the specified phase of the standard build lifecycle:
- package
- Requires the dependencies in this specified scope:
- test
- Requires a Maven project to run:
- true
Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
Method Summary |
void |
execute()
Generates the JAR. |
protected File |
getClassesDirectory()
Return the test-classes directory, to serve as the root of the tests jar. |
protected String |
getClassifier()
Overload this to produce a jar with another classifier, for example a test-jar. |
protected String |
getType()
Overload this to produce a test-jar, for example. |
Methods inherited from class org.apache.maven.plugin.AbstractMojo |
getLog, getPluginContext, setLog, setPluginContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TestJarMojo
public TestJarMojo()
getClassifier
protected String getClassifier()
- Description copied from class:
AbstractJarMojo
- Overload this to produce a jar with another classifier, for example a test-jar.
- Specified by:
getClassifier
in class AbstractJarMojo
getType
protected String getType()
- Description copied from class:
AbstractJarMojo
- Overload this to produce a test-jar, for example.
- Specified by:
getType
in class AbstractJarMojo
- Returns:
- type of the generated artifact
getClassesDirectory
protected File getClassesDirectory()
- Return the test-classes directory, to serve as the root of the tests jar.
- Specified by:
getClassesDirectory
in class AbstractJarMojo
execute
public void execute()
throws org.apache.maven.plugin.MojoExecutionException
- Description copied from class:
AbstractJarMojo
- Generates the JAR.
- Specified by:
execute
in interface org.apache.maven.plugin.Mojo
- Overrides:
execute
in class AbstractJarMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.