Package aQute.bnd.maven.plugin
Class BndMavenTestsPlugin
java.lang.Object
org.apache.maven.plugin.AbstractMojo
aQute.bnd.maven.plugin.AbstractBndMavenPlugin
aQute.bnd.maven.plugin.BndMavenTestsPlugin
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
BndMavenPackagingTestsPlugin
@Mojo(name="bnd-process-tests",
defaultPhase=PROCESS_TEST_CLASSES,
requiresDependencyResolution=TEST,
threadSafe=true)
public class BndMavenTestsPlugin
extends AbstractBndMavenPlugin
Processes the test target classes to generate OSGi metadata.
This goal has the default phase of "process-test-classes".
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Whether the test artifact is an OSGi fragment.private File
The directory where themaven-compiler-plugin
places its output.private File
The directory where themaven-compiler-plugin
placed the main output.private File
Specify the path to store the generated manifest file.private File
The directory where this plugin will store its output.private List
<org.apache.maven.model.Resource> private boolean
Skip this goal.private boolean
Skip this goal.private File
private TestCases
The test case types to generate into theTest-Cases
manifest header.Fields inherited from class aQute.bnd.maven.plugin.AbstractBndMavenPlugin
artifactHandlerManager, bnd, bndfile, buildContext, finalName, includeClassesDir, LAST_MODIFIED, logger, MARKED_FILES, mojoExecution, outputTimestamp, PACKAGING_JAR, PACKAGING_WAR, packagingTypes, project, projectHelper, propertiesFile, settings, skipIfEmpty, SNAPSHOT, TSTAMP, webappDirectory
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList
<org.apache.maven.model.Resource> boolean
isSkip()
protected void
processBuilder
(aQute.bnd.osgi.Builder builder) If a mojo needs to tweak the builder for any particular reason, do it here.protected void
processBuildPath
(List<Object> buildpath) If a mojo needs to update the buildpath for any particular reason, do it here.protected void
reportErrorsAndWarnings
(aQute.bnd.osgi.Builder builder) Methods inherited from class aQute.bnd.maven.plugin.AbstractBndMavenPlugin
execute, getClassifier, getType, getWebappDirectory, isEmpty
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
artifactFragment
@Parameter(defaultValue="false") private boolean artifactFragmentWhether the test artifact is an OSGi fragment.If true, make the tests artifact a fragment using
${project.artifactId}
as theFragment-Host
header and setting theBundle-SymbolicName
of the tests artifact to${project.artifactId}-tests
. -
testCases
-
sourceDir
@Parameter(defaultValue="${project.build.testSourceDirectory}", readonly=true) private File sourceDir -
resources
@Parameter(defaultValue="${project.build.testResources}", readonly=true) private List<org.apache.maven.model.Resource> resources -
mainClassesDir
The directory where themaven-compiler-plugin
placed the main output. -
classesDir
The directory where themaven-compiler-plugin
places its output. -
outputDir
The directory where this plugin will store its output. -
manifestPath
@Parameter(defaultValue="${project.build.testOutputDirectory}/META-INF/MANIFEST.MF") private File manifestPathSpecify the path to store the generated manifest file. -
skip
@Parameter(property="maven.test.skip", defaultValue="false") private boolean skipSkip this goal. The goal can also be skipped with theskipGoal
configuration. -
skipGoal
@Parameter(property="bnd-tests.skip", defaultValue="false") private boolean skipGoalSkip this goal. The goal can also be skipped with theskip
configuration.
-
-
Constructor Details
-
BndMavenTestsPlugin
public BndMavenTestsPlugin()
-
-
Method Details
-
getSourceDir
- Specified by:
getSourceDir
in classAbstractBndMavenPlugin
-
getResources
- Specified by:
getResources
in classAbstractBndMavenPlugin
-
getClassesDir
- Specified by:
getClassesDir
in classAbstractBndMavenPlugin
-
getOutputDir
- Specified by:
getOutputDir
in classAbstractBndMavenPlugin
-
getManifestPath
- Specified by:
getManifestPath
in classAbstractBndMavenPlugin
-
isSkip
public boolean isSkip()- Specified by:
isSkip
in classAbstractBndMavenPlugin
-
processBuildPath
Description copied from class:AbstractBndMavenPlugin
If a mojo needs to update the buildpath for any particular reason, do it here.- Overrides:
processBuildPath
in classAbstractBndMavenPlugin
- Parameters:
buildpath
- the set of jars and class directories used while analyzing the jar contents
-
processBuilder
protected void processBuilder(aQute.bnd.osgi.Builder builder) throws org.apache.maven.plugin.MojoFailureException Description copied from class:AbstractBndMavenPlugin
If a mojo needs to tweak the builder for any particular reason, do it here.- Overrides:
processBuilder
in classAbstractBndMavenPlugin
- Parameters:
builder
- the Builder created to analyze the jar contents- Throws:
org.apache.maven.plugin.MojoFailureException
- if an issue is encountered
-
reportErrorsAndWarnings
protected void reportErrorsAndWarnings(aQute.bnd.osgi.Builder builder) throws org.apache.maven.plugin.MojoFailureException - Overrides:
reportErrorsAndWarnings
in classAbstractBndMavenPlugin
- Throws:
org.apache.maven.plugin.MojoFailureException
-