@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 and Description |
---|
TestMojo() |
Modifier and Type | Method and 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() |
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected boolean shouldSkip()
protected org.apache.maven.model.Dependency newBundleDependency(String bundleId)
protected Properties getMergedProviderProperties() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected org.apache.maven.surefire.util.ScanResult scanForTests()
protected org.apache.maven.toolchain.Toolchain getToolchain() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
Copyright © 2008–2018 Eclipse Foundation. All rights reserved.