Package org.eclipse.tycho.surefire
Class TestMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.eclipse.tycho.surefire.TestMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="test", defaultPhase=INTEGRATION_TEST, requiresDependencyResolution=RUNTIME) public class TestMojo extends org.apache.maven.plugin.AbstractMojo
Executes tests in an OSGi runtime.
The goal launches an OSGi runtime and executes the project's tests in that runtime. The "test runtime" consists of the bundle built in this project and its transitive dependencies, plus some Equinox and test harness bundles. The bundles are resolved from the target platform of the project. Note that the test runtime does typically not contain the entire target platform. If there are implicitly required bundles (e.g. org.eclipse.equinox.ds to make declarative services work), they need to be added manually through an extraRequirements configuration on the target-platform-configuration plugin.
-
-
Constructor Summary
Constructors Constructor Description TestMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
protected Properties
getMergedProviderProperties()
protected org.apache.maven.toolchain.Toolchain
getToolchain()
protected org.apache.maven.model.Dependency
newBundleDependency(String bundleId)
protected org.apache.maven.surefire.util.ScanResult
scanForTests()
protected boolean
shouldSkip()
-
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
shouldSkip
protected boolean shouldSkip()
-
newBundleDependency
protected org.apache.maven.model.Dependency newBundleDependency(String bundleId)
-
getMergedProviderProperties
protected Properties getMergedProviderProperties() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
scanForTests
protected org.apache.maven.surefire.util.ScanResult scanForTests()
-
getToolchain
protected org.apache.maven.toolchain.Toolchain getToolchain() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-