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
@Mojo(name="bnd-process-tests",
defaultPhase=PROCESS_TEST_CLASSES,
requiresDependencyResolution=TEST,
threadSafe=true)
public class BndMavenTestsPlugin
extends AbstractBndMavenPlugin
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanIf true, make the tests artifact a fragment using${project.artifactId}as theFragment-Hostheader and setting theBundle-SymbolicNameof the tests artifact to${project.artifactId}-tests.private Fileprivate Fileprivate Fileprivate Fileprivate List<org.apache.maven.model.Resource>private booleanprivate Fileprivate TestCasesFields inherited from class aQute.bnd.maven.plugin.AbstractBndMavenPlugin
bnd, bndfile, buildContext, includeClassesDir, logger, MANIFEST_LAST_MODIFIED, MARKED_FILES, mojoExecution, OUTPUT_TIMESTAMP, PACKAGING_JAR, PACKAGING_WAR, packagingTypes, project, propertiesFile, settings, SNAPSHOT, targetDir, TSTAMP, warOutputDirFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<org.apache.maven.model.Resource>booleanisSkip()protected voidprocessBuilder(aQute.bnd.osgi.Builder builder) If a mojo needs to tweak the builder for any particular reason, do it here.protected voidprocessBuildPath(List<Object> buildpath) If a mojo needs to update the buildpath for any particular reason, do it here.protected voidreportErrorsAndWarnings(aQute.bnd.osgi.Builder builder) Methods inherited from class aQute.bnd.maven.plugin.AbstractBndMavenPlugin
executeMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
artifactFragment
@Parameter(defaultValue="false") private boolean artifactFragmentIf true, make the tests artifact a fragment using${project.artifactId}as theFragment-Hostheader and setting theBundle-SymbolicNameof 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
@Parameter(defaultValue="${project.build.outputDirectory}", readonly=true) private File mainClassesDir -
classesDir
@Parameter(defaultValue="${project.build.testOutputDirectory}", readonly=true) private File classesDir -
outputDir
@Parameter(defaultValue="${project.build.testOutputDirectory}", readonly=true) private File outputDir -
manifestPath
@Parameter(defaultValue="${project.build.testOutputDirectory}/META-INF/MANIFEST.MF", readonly=true) private File manifestPath -
skip
@Parameter(property="bnd-tests.skip", defaultValue="false") private boolean skip
-
-
Constructor Details
-
BndMavenTestsPlugin
public BndMavenTestsPlugin()
-
-
Method Details
-
getSourceDir
- Specified by:
getSourceDirin classAbstractBndMavenPlugin
-
getResources
- Specified by:
getResourcesin classAbstractBndMavenPlugin
-
getClassesDir
- Specified by:
getClassesDirin classAbstractBndMavenPlugin
-
getOutputDir
- Specified by:
getOutputDirin classAbstractBndMavenPlugin
-
getManifestPath
- Specified by:
getManifestPathin classAbstractBndMavenPlugin
-
isSkip
public boolean isSkip()- Specified by:
isSkipin classAbstractBndMavenPlugin
-
processBuildPath
Description copied from class:AbstractBndMavenPluginIf a mojo needs to update the buildpath for any particular reason, do it here.- Overrides:
processBuildPathin 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:AbstractBndMavenPluginIf a mojo needs to tweak the builder for any particular reason, do it here.- Overrides:
processBuilderin 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:
reportErrorsAndWarningsin classAbstractBndMavenPlugin- Throws:
org.apache.maven.plugin.MojoFailureException
-