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
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
artifactFragment
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
.private java.io.File
classesDir
private java.io.File
mainClassesDir
private java.io.File
manifestPath
private java.io.File
outputDir
private java.util.List<org.apache.maven.model.Resource>
resources
private boolean
skip
private boolean
skipGoal
private java.io.File
sourceDir
private TestCases
testCases
-
Fields inherited from class aQute.bnd.maven.plugin.AbstractBndMavenPlugin
bnd, bndfile, buildContext, includeClassesDir, logger, MANIFEST_LAST_MODIFIED, MARKED_FILES, mojoExecution, PACKAGING_JAR, PACKAGING_WAR, packagingTypes, project, projectHelper, propertiesFile, settings, skipIfEmpty, SNAPSHOT, targetDir, TSTAMP, warOutputDir
-
-
Constructor Summary
Constructors Constructor Description BndMavenTestsPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.File
getClassesDir()
java.io.File
getManifestPath()
java.io.File
getOutputDir()
java.util.List<org.apache.maven.model.Resource>
getResources()
java.io.File
getSourceDir()
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(java.util.List<java.lang.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, isEmpty
-
-
-
-
Field Detail
-
artifactFragment
@Parameter(defaultValue="false") private boolean artifactFragment
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
@Parameter(defaultValue="junit5") private TestCases testCases
-
sourceDir
@Parameter(defaultValue="${project.build.testSourceDirectory}", readonly=true) private java.io.File sourceDir
-
resources
@Parameter(defaultValue="${project.build.testResources}", readonly=true) private java.util.List<org.apache.maven.model.Resource> resources
-
mainClassesDir
@Parameter(defaultValue="${project.build.outputDirectory}", readonly=true, required=false) private java.io.File mainClassesDir
-
classesDir
@Parameter(defaultValue="${project.build.testOutputDirectory}", readonly=true) private java.io.File classesDir
-
outputDir
@Parameter(defaultValue="${project.build.testOutputDirectory}", readonly=true) private java.io.File outputDir
-
manifestPath
@Parameter(defaultValue="${project.build.testOutputDirectory}/META-INF/MANIFEST.MF", readonly=true) private java.io.File manifestPath
-
skip
@Parameter(property="maven.test.skip", defaultValue="false") private boolean skip
-
skipGoal
@Parameter(property="bnd-tests.skip", defaultValue="false") private boolean skipGoal
-
-
Method Detail
-
getSourceDir
public java.io.File getSourceDir()
- Specified by:
getSourceDir
in classAbstractBndMavenPlugin
-
getResources
public java.util.List<org.apache.maven.model.Resource> getResources()
- Specified by:
getResources
in classAbstractBndMavenPlugin
-
getClassesDir
public java.io.File getClassesDir()
- Specified by:
getClassesDir
in classAbstractBndMavenPlugin
-
getOutputDir
public java.io.File getOutputDir()
- Specified by:
getOutputDir
in classAbstractBndMavenPlugin
-
getManifestPath
public java.io.File getManifestPath()
- Specified by:
getManifestPath
in classAbstractBndMavenPlugin
-
isSkip
public boolean isSkip()
- Specified by:
isSkip
in classAbstractBndMavenPlugin
-
processBuildPath
protected void processBuildPath(java.util.List<java.lang.Object> buildpath)
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
-
-