Class TestSourceJarNoForkMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugins.source.AbstractSourceJarMojo
org.apache.maven.plugins.source.TestSourceJarNoForkMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
TestSourceGeneratedJarMojo, TestSourceJarMojo
@Mojo(name="test-jar-no-fork",
defaultPhase=PACKAGE,
threadSafe=true)
public class TestSourceJarNoForkMojo
extends AbstractSourceJarMojo
This goal bundles all the test sources into a jar archive. This goal functions the same
as the test-jar goal but does not fork the build, and is suitable for attaching
to the build lifecycle.
- Since:
- 2.1
-
Field Summary
FieldsFields inherited from class AbstractSourceJarMojo
excludeResources, finalName, includePom, outputDirectory, reactorProjectsFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected List<org.apache.maven.model.Resource> getResources(org.apache.maven.project.MavenProject p) getSources(org.apache.maven.project.MavenProject p) Methods inherited from class AbstractSourceJarMojo
addDirectory, addDirectory, archiveProjectContent, createArchiver, execute, getExtension, getProject, getProject, getType, packageSources, packageSources, setProjectMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
classifier
@Parameter(property="maven.source.test.classifier", defaultValue="test-sources") protected String classifier- Since:
- 2.2
-
-
Constructor Details
-
TestSourceJarNoForkMojo
public TestSourceJarNoForkMojo()
-
-
Method Details
-
getSources
- Specified by:
getSourcesin classAbstractSourceJarMojo- Parameters:
p-MavenProjectnot null- Returns:
- the compile or test sources
-
getResources
protected List<org.apache.maven.model.Resource> getResources(org.apache.maven.project.MavenProject p) - Specified by:
getResourcesin classAbstractSourceJarMojo- Parameters:
p-MavenProjectnot null- Returns:
- the compile or test resources
-
getClassifier
- Specified by:
getClassifierin classAbstractSourceJarMojo- Returns:
- the wanted classifier, ie
sourcesortest-sources
-