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.AbstractMojoExecutes 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.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringappArgLineArbitrary applications arguments to set on the command line.private java.lang.StringapplicationEclipse application to be run.private java.lang.StringargLineArbitrary JVM options to set on the command line.private BundleStartLevel[]bundleStartLevelBundle start level and auto start configuration used by the test runtime.private intdebugPortSet this parameter to suspend the test JVM waiting for a client to open a remote debug session on the specified port.private BundleStartLeveldefaultStartLevelThe default bundle start level and auto start configuration used by the test runtime for bundles where the start level/auto start is not configured inbundleStartLevel.private booleandeleteOsgiDataDirectoryWhether to recursively delete the directoryosgiDataDirectorybefore running the tests.private org.apache.maven.model.Dependency[]dependenciesAdditional dependencies to be added to the test runtime.private DefaultDependencyResolverFactorydependencyResolverLocatorprivate booleanenableAssertionsBy default, Tycho Surefire disables JVM assertions for the execution of your test cases.private java.util.Map<java.lang.String,java.lang.String>environmentVariablesAdditional environments to set for the forked test JVM.private java.lang.StringexcludedGroups(junit47 provider with JUnit4.8+ only) Excluded groups/categories (comma-separated).private java.util.List<java.lang.String>excludesList of patterns (separated by commas) used to specify the tests that should be excluded in testing.private java.lang.String[]explodedBundlesList of bundles that must be expanded in order to execute the tests.private booleanfailIfNoTestsIf set to "false" the test execution will not fail in case there are no tests found.private intforkedProcessTimeoutInSecondsKill the forked test process after a certain number of seconds.private org.apache.maven.model.Dependency[]frameworkExtensionsList of framework extension bundles to add.private java.lang.Stringgroups(junit47 provider with JUnit4.8+ only) Groups/categories for this test (comma-separated).private java.util.List<java.lang.String>includesList of patterns (separated by commas) used to specify the tests that should be included in testing.private EquinoxInstallationFactoryinstallationFactoryprivate EquinoxLauncherlauncherprivate OsgiBundleProjectosgiBundleprivate java.io.FileosgiDataDirectoryOSGi data directory (osgi.instance.area, aka the workspace) of the Equinox runtime used to execute tests.private ParallelModeparallel(JUnit 4.7 provider) Supports values "classes"/"methods"/"both" to run in separate threads, as controlled by threadCount.private booleanperCoreThreadCount(JUnit 4.7 provider) Indicates that threadCount is per cpu core.private java.util.List<org.apache.maven.artifact.Artifact>pluginArtifactsprivate java.lang.StringproductEclipse product to be run, i.e.private java.lang.StringprofileNamep2 profile name of the installation under test.private org.apache.maven.project.MavenProjectprojectprivate java.util.Map<java.lang.String,TychoProject>projectTypesprivate ProviderHelperproviderHelperprivate java.lang.StringproviderHintNormally tycho will automatically determine the test framework provider based on the test project's classpath.private java.util.PropertiesproviderPropertiesUse this to specify surefire provider-specific properties.private ProvisionedInstallationBuilderFactoryprovisionedInstallationBuilderFactoryprivate booleanredirectTestOutputToFileSet this to "true" to redirect the unit test standard output to a file (found in reportsDirectory/testName-output.txt).private java.io.FilereportsDirectoryBase directory where all reports are written to.private RepositoryReferenceToolrepositoryReferenceToolprivate org.apache.maven.repository.RepositorySystemrepositorySystemprivate java.lang.IntegerrerunFailingTestsCountFlaky tests will re-run until they pass or the number of reruns has been exhausted.private org.apache.maven.artifact.resolver.ResolutionErrorHandlerresolutionErrorHandlerprivate java.lang.StringrunOrderDefines the order the tests will be run in.private org.apache.maven.execution.MavenSessionsessionprivate booleanshowEclipseLogEnables -debug -consolelog for the test OSGi runtimeprivate java.lang.BooleanskipSame asskipTestsprivate java.lang.IntegerskipAfterFailureCountSkips the remaining tests after the Nth failure or error.private booleanskipExecDeprecated.Use skipTests instead.private java.lang.BooleanskipTestsSet this to "true" to skip running tests, but still compile them.private java.util.List<java.lang.String>suiteXmlFilesOnly supported by the TestNG test provider.private java.io.FilesurefirePropertiesprivate java.util.Map<java.lang.String,java.lang.String>systemPropertiesAdditional system properties to set for the forked test JVM.private java.lang.StringtestSpecify this parameter if you want to use the test pattern matching notation, Ant pattern matching, to select tests to run.private java.lang.StringtestClassIdentifies a single test (suite) class to run.private java.io.FiletestClassesDirectoryThe directory containing generated test classes of the project being tested.private booleantestFailureIgnoreSet this to true to ignore a failure during testing.private java.lang.StringtestRuntimeHow to create the OSGi test runtime.private intthreadCount(JUnit 4.7 provider) The attribute thread-count allows you to specify how many threads should be allocated for this execution.private org.apache.maven.toolchain.ToolchainManagertoolchainManagerprivate ToolchainProvidertoolchainProviderprivate booleantrimStackTraceWhentrue, stack traces are trimmed to only show lines within the test.private ToolchainProvider.JDKUsageuseJDKWhich JDK to use for executing tests.private booleanuseUIHarnessRun tests using UI (true) or headless (false) test harness.private booleanuseUIThreadRun tests in UI (true) or background (false) thread.private booleanuseUnlimitedThreads(JUnit 4.7 provider) Indicates that the thread pool will be unlimited.private java.io.FileworkRoot directory (osgi.install.area) of the Equinox runtime used to execute tests.private DevWorkspaceResolverworkspaceState
-
Constructor Summary
Constructors Constructor Description TestMojo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddCustomProfileArg(EquinoxLaunchConfiguration cli)(package private) voidaddProgramArgs(EquinoxLaunchConfiguration cli, java.lang.String... arguments)private static voidappendCommaSeparated(java.lang.StringBuilder sb, java.lang.String string)(package private) LaunchConfigurationcreateCommandLine(EquinoxInstallation testRuntime)private EquinoxInstallationcreateEclipseInstallation()private EquinoxInstallationcreateProvisionedInstallation()private voidcreateSurefireProperties(TestFrameworkProvider provider)voidexecute()private java.lang.StringgetBuildOutputDirectories()private ArtifactKeygetBundleArtifactKey(java.io.File file)private java.util.List<java.lang.String>getBundlesToExplode()private java.util.List<org.apache.maven.model.Dependency>getExtraDependencies()private java.util.List<java.io.File>getFrameworkExtensions()private java.util.List<java.lang.String>getIUsToInstall(java.util.Set<org.apache.maven.artifact.Artifact> testHarnessArtifacts)protected java.util.PropertiesgetMergedProviderProperties()private java.util.Map<java.lang.String,java.lang.String>getMergedSystemProperties()private BundleProjectgetProjectType()private ReactorProjectgetReactorProject()private java.util.List<ReactorProject>getReactorProjects()private java.lang.StringgetTestApplication(EquinoxInstallationDescription testRuntime)private java.lang.StringgetTestBundleSymbolicName()private java.util.List<org.apache.maven.model.Dependency>getTestDependencies()protected org.apache.maven.toolchain.ToolchaingetToolchain()protected org.apache.maven.model.DependencynewBundleDependency(java.lang.String bundleId)private java.util.Map<java.lang.String,java.lang.String>propertiesAsMap(java.util.Properties p)private voidrunTest(EquinoxInstallation testRuntime)protected org.apache.maven.surefire.api.util.ScanResultscanForTests()protected booleanshouldSkip()(package private) java.lang.String[]splitArgLine(java.lang.String argLine)private voidstoreProperties(java.util.Map<java.lang.String,java.lang.String> propertiesMap, java.io.File file)
-
-
-
Field Detail
-
work
@Parameter(defaultValue="${project.build.directory}/work") private java.io.File workRoot directory (osgi.install.area) of the Equinox runtime used to execute tests.
-
osgiDataDirectory
@Parameter(defaultValue="${project.build.directory}/work/data/") private java.io.File osgiDataDirectoryOSGi data directory (osgi.instance.area, aka the workspace) of the Equinox runtime used to execute tests.
-
deleteOsgiDataDirectory
@Parameter(defaultValue="true") private boolean deleteOsgiDataDirectory
Whether to recursively delete the directoryosgiDataDirectorybefore running the tests.
-
project
@Parameter(property="project", readonly=true) private org.apache.maven.project.MavenProject project
-
debugPort
@Parameter(property="debugPort") private int debugPort
Set this parameter to suspend the test JVM waiting for a client to open a remote debug session on the specified port.
-
includes
@Parameter private java.util.List<java.lang.String> includes
List of patterns (separated by commas) used to specify the tests that should be included in testing. When not specified and when thetestparameter is not specified, the default includes will be**/Test*.java **/*Test.java **/*TestCase.java
-
excludes
@Parameter private java.util.List<java.lang.String> excludes
List of patterns (separated by commas) used to specify the tests that should be excluded in testing. When not specified and when thetestparameter is not specified, the default excludes will be**/*$*(which excludes all inner classes).
-
test
@Parameter(property="test") private java.lang.String test
Specify this parameter if you want to use the test pattern matching notation, Ant pattern matching, to select tests to run. The Ant pattern will be used to create an include pattern formatted like**/${test}.javaWhen used, theincludesandexcludespatterns parameters are ignored
-
skipExec
@Deprecated @Parameter(property="maven.test.skipExec") private boolean skipExec
Deprecated.Use skipTests instead.
-
skipTests
@Parameter(property="skipTests") private java.lang.Boolean skipTests
Set this to "true" to skip running tests, but still compile them. Its use is NOT RECOMMENDED, but quite convenient on occasion. Default:false
-
skip
@Parameter(property="maven.test.skip") private java.lang.Boolean skip
Same asskipTests
-
failIfNoTests
@Parameter(property="failIfNoTests", defaultValue="true") private boolean failIfNoTestsIf set to "false" the test execution will not fail in case there are no tests found.
-
groups
@Parameter(property="groups") private java.lang.String groups
(junit47 provider with JUnit4.8+ only) Groups/categories for this test (comma-separated). Only classes/methods/etc decorated with one of the group/category specified here will be included in test run, if specified. For JUnit, this parameter forces the use of the junit47 provider
-
excludedGroups
@Parameter(property="excludedGroups") private java.lang.String excludedGroups
(junit47 provider with JUnit4.8+ only) Excluded groups/categories (comma-separated). Any methods/classes/etc with one of the groups/categories specified in this list will specifically not be run. For JUnit, this parameter forces the use of the junit47 provider
-
testFailureIgnore
@Parameter(property="maven.test.failure.ignore", defaultValue="false") private boolean testFailureIgnoreSet this to true to ignore a failure during testing. Its use is NOT RECOMMENDED, but quite convenient on occasion.
-
testClassesDirectory
@Parameter(property="project.build.outputDirectory") private java.io.File testClassesDirectory
The directory containing generated test classes of the project being tested.
-
showEclipseLog
@Parameter(property="tycho.showEclipseLog", defaultValue="false") private boolean showEclipseLogEnables -debug -consolelog for the test OSGi runtime
-
redirectTestOutputToFile
@Parameter(property="maven.test.redirectTestOutputToFile", defaultValue="false") private boolean redirectTestOutputToFileSet this to "true" to redirect the unit test standard output to a file (found in reportsDirectory/testName-output.txt).
-
reportsDirectory
@Parameter(defaultValue="${project.build.directory}/surefire-reports") private java.io.File reportsDirectoryBase directory where all reports are written to.
-
surefireProperties
@Parameter(defaultValue="${project.build.directory}/surefire.properties") private java.io.File surefireProperties
-
dependencies
@Parameter private org.apache.maven.model.Dependency[] dependencies
Additional dependencies to be added to the test runtime. Ignored iftestRuntimeisp2Installed. Note: This parameter has only limited support for dependencies to artifacts within the reactor. Therefore it is recommended to specify extraRequirements on the target-platform-configuration plugin instead. Example:<plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>target-platform-configuration</artifactId> <version>${tycho-version}</version> <configuration> <dependency-resolution> <extraRequirements> <requirement> <type>eclipse-feature</type> <id>example.project.feature</id> <versionRange>0.0.0</versionRange> </requirement> </extraRequirements> </dependency-resolution> </configuration> </plugin>The dependencies specified as extraRequirements are – together with the dependencies specified in the MANIFEST.MF of the project – transitively resolved against the target platform. The resulting set of bundles is included in the test runtime.
-
application
@Parameter private java.lang.String application
Eclipse application to be run. If not specified, default application org.eclipse.ui.ide.workbench will be used. Application runnable will be invoked from test harness, not directly from Eclipse. Note that you need to ensure that the bundle which defines the configured application is included in the test runtime.
-
product
@Parameter private java.lang.String product
Eclipse product to be run, i.e. -product parameter passed to test Eclipse runtime.
-
session
@Parameter(property="session", readonly=true, required=true) private org.apache.maven.execution.MavenSession session
-
useUIHarness
@Parameter(defaultValue="false") private boolean useUIHarness
Run tests using UI (true) or headless (false) test harness.
-
useUIThread
@Parameter(defaultValue="true") private boolean useUIThread
Run tests in UI (true) or background (false) thread. Only applies to UI test harness.
-
enableAssertions
@Parameter(property="enableAssertions", defaultValue="false") private boolean enableAssertionsBy default, Tycho Surefire disables JVM assertions for the execution of your test cases. To enable the assertions, set this flag to "true".- Since:
- 1.5.0
-
pluginArtifacts
@Parameter(property="plugin.artifacts") private java.util.List<org.apache.maven.artifact.Artifact> pluginArtifacts
-
argLine
@Parameter(property="tycho.testArgLine") private java.lang.String argLine
Arbitrary JVM options to set on the command line.
-
appArgLine
@Parameter private java.lang.String appArgLine
Arbitrary applications arguments to set on the command line.
-
forkedProcessTimeoutInSeconds
@Parameter(property="surefire.timeout") private int forkedProcessTimeoutInSeconds
Kill the forked test process after a certain number of seconds. If set to 0, wait forever for the process, never timing out.
-
testClass
@Parameter(property="testClass") private java.lang.String testClass
Identifies a single test (suite) class to run. This is useful if you have a single JUnit test suite class defining which tests should be executed. Will be ignored iftestis specified. Example:<testClass>foo.bar.FooTest</testClass>
-
environmentVariables
@Parameter private java.util.Map<java.lang.String,java.lang.String> environmentVariables
Additional environments to set for the forked test JVM.
-
systemProperties
@Parameter private java.util.Map<java.lang.String,java.lang.String> systemProperties
Additional system properties to set for the forked test JVM.
-
explodedBundles
@Parameter private java.lang.String[] explodedBundles
List of bundles that must be expanded in order to execute the tests. Ignored iftestRuntimeisp2Installed.
-
frameworkExtensions
@Parameter private org.apache.maven.model.Dependency[] frameworkExtensions
List of framework extension bundles to add. Note: The goal does not automatically detect which bundles in the test runtime are framework extensions, but they have to be explicitly specified using this parameter. Ignored iftestRuntimeisp2Installed.
-
bundleStartLevel
@Parameter private BundleStartLevel[] bundleStartLevel
Bundle start level and auto start configuration used by the test runtime. Ignored iftestRuntimeisp2Installed. Example:<bundleStartLevel> <bundle> <id>foo.bar.myplugin</id> <level>6</level> <autoStart>true</autoStart> </bundle> </bundleStartLevel>
-
defaultStartLevel
@Parameter private BundleStartLevel defaultStartLevel
The default bundle start level and auto start configuration used by the test runtime for bundles where the start level/auto start is not configured inbundleStartLevel. Ignored iftestRuntimeisp2Installed. Example:<defaultStartLevel> <level>6</level> <autoStart>true</autoStart> </defaultStartLevel>
-
rerunFailingTestsCount
@Parameter(property="surefire.rerunFailingTestsCount", defaultValue="0") private java.lang.Integer rerunFailingTestsCountFlaky tests will re-run until they pass or the number of reruns has been exhausted. See surefire documentation for details.Note: This feature is supported only for JUnit 4.x
-
skipAfterFailureCount
@Parameter(property="surefire.skipAfterFailureCount", defaultValue="0") private java.lang.Integer skipAfterFailureCountSkips the remaining tests after the Nth failure or error. See surefire documentation for details.
-
repositorySystem
@Component private org.apache.maven.repository.RepositorySystem repositorySystem
-
resolutionErrorHandler
@Component private org.apache.maven.artifact.resolver.ResolutionErrorHandler resolutionErrorHandler
-
dependencyResolverLocator
@Component private DefaultDependencyResolverFactory dependencyResolverLocator
-
projectTypes
@Component(role=TychoProject.class) private java.util.Map<java.lang.String,TychoProject> projectTypes
-
installationFactory
@Component private EquinoxInstallationFactory installationFactory
-
provisionedInstallationBuilderFactory
@Component private ProvisionedInstallationBuilderFactory provisionedInstallationBuilderFactory
-
launcher
@Component private EquinoxLauncher launcher
-
osgiBundle
@Component(role=TychoProject.class, hint="eclipse-plugin") private OsgiBundleProject osgiBundle
-
providerHint
@Parameter private java.lang.String providerHint
Normally tycho will automatically determine the test framework provider based on the test project's classpath. Use this to force using a test framework provider implementation with the given role hint. Tycho comes with providers "junit3","junit4","junit47". Note that when specifying a providerHint, you have to make sure the provider is actually available in the dependencies of tycho-surefire-plugin.- Since:
- 0.16.0
-
runOrder
@Parameter(defaultValue="filesystem") private java.lang.String runOrder
Defines the order the tests will be run in. Supported values are "alphabetical", "reversealphabetical", "random", "hourly" (alphabetical on even hours, reverse alphabetical on odd hours) and "filesystem".- Since:
- 0.19.0
-
trimStackTrace
@Parameter(property="trimStackTrace", defaultValue="true") private boolean trimStackTraceWhentrue, stack traces are trimmed to only show lines within the test.- Since:
- 1.3.0
-
parallel
@Parameter(property="parallel") private ParallelMode parallel
(JUnit 4.7 provider) Supports values "classes"/"methods"/"both" to run in separate threads, as controlled by threadCount.- Since:
- 0.16.0
-
perCoreThreadCount
@Parameter(property="perCoreThreadCount", defaultValue="true") private boolean perCoreThreadCount(JUnit 4.7 provider) Indicates that threadCount is per cpu core.- Since:
- 0.16.0
-
threadCount
@Parameter(property="threadCount") private int threadCount
(JUnit 4.7 provider) The attribute thread-count allows you to specify how many threads should be allocated for this execution. Only makes sense to use in conjunction with the parallel parameter.- Since:
- 0.16.0
-
useUnlimitedThreads
@Parameter(property="useUnlimitedThreads", defaultValue="false") private boolean useUnlimitedThreads(JUnit 4.7 provider) Indicates that the thread pool will be unlimited. The parallel parameter and the actual number of classes/methods will decide. Setting this to "true" effectively disables perCoreThreadCount and threadCount.- Since:
- 0.16.0
-
providerProperties
@Parameter private java.util.Properties providerProperties
Use this to specify surefire provider-specific properties.- Since:
- 0.16.0
-
testRuntime
@Parameter(defaultValue="default") private java.lang.String testRuntime
How to create the OSGi test runtime. Allowed values aredefaultandp2Installed. Modep2Installedis EXPERIMENTAL - only works when installing products under test (see below).- In
defaultmode, all necessary files to define the test runtime like config.ini are generated by tycho. This installation mode has the advantage that the test runtime is minimal (defined by the transitive dependencies of the test bundle plus and the test harness) and existing bundle jars are referenced rather than copied for the installation - In
p2Installedmode, use p2 director to install test bundle, test harness bundles and respective dependencies. This installation mode can be used for integration tests that require a fully p2-provisioned installation. To install a product IU, add it as extra requirement to the test bundle (see example below). Note that this installation mode comes with a certain performance overhead for executing the provisioning operations otherwise not required.
<plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>tycho-surefire-plugin</artifactId> <version>${tycho-version}</version> <configuration> <testRuntime>p2Installed</testRuntime> </configuration> </plugin> <plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>target-platform-configuration</artifactId> <version>${tycho-version}</version> <configuration> <dependency-resolution> <extraRequirements> <!-- product IU under test --> <requirement> <type>p2-installable-unit</type> <id>example.product.id</id> <versionRange>0.0.0</versionRange> </requirement> </extraRequirements> </dependency-resolution> </configuration> </plugin>- Since:
- 0.19.0
- In
-
profileName
@Parameter(defaultValue="DefaultProfile") private java.lang.String profileName
p2 profile name of the installation under test. Only relevant iftestRuntimeisp2Installed. If tests are installed on top of an already existing installation inwork, this must match the name of the existing profile.- Since:
- 0.19.0
-
toolchainManager
@Component private org.apache.maven.toolchain.ToolchainManager toolchainManager
-
providerHelper
@Component private ProviderHelper providerHelper
-
workspaceState
@Component private DevWorkspaceResolver workspaceState
-
repositoryReferenceTool
@Component private RepositoryReferenceTool repositoryReferenceTool
-
toolchainProvider
@Component private ToolchainProvider toolchainProvider
-
useJDK
@Parameter(defaultValue="SYSTEM") private ToolchainProvider.JDKUsage useJDK
Which JDK to use for executing tests. Possible values are:SYSTEM,BREE.- SYSTEM: Use the currently running JVM (or from toolchain if configured in pom.xml)
- BREE: use MANIFEST header
Bundle-RequiredExecutionEnvironmentto lookup the JDK from toolchains.xml. The value of BREE will be matched against the id of the toolchain elements in toolchains.xml.
InMETA-INF/MANIFEST.MF:Bundle-RequiredExecutionEnvironment: JavaSE-1.7
In toolchains.xml:<toolchains> <toolchain> <type>jdk</type> <provides> <id>JavaSE-1.7</id> </provides> <configuration> <jdkHome>/path/to/jdk/1.7</jdkHome> </configuration> </toolchain> </toolchains>
-
suiteXmlFiles
@Parameter private java.util.List<java.lang.String> suiteXmlFiles
Only supported by the TestNG test provider. The values specified are passed to TestNG as test suite files. The suite files will overwrite theincludesandexcludespatterns. The path to the suite file(s) could be relative (test bundle classpath) or an absolute path to xml files outside the test bundle.<configuration> <suiteXmlFiles> <suiteXmlFile>myTestSuite.xml</suiteXmlFile> </suiteXmlFiles> </configuration>
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
shouldSkip
protected boolean shouldSkip()
-
getReactorProject
private ReactorProject getReactorProject()
-
getReactorProjects
private java.util.List<ReactorProject> getReactorProjects()
-
createProvisionedInstallation
private EquinoxInstallation createProvisionedInstallation() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getIUsToInstall
private java.util.List<java.lang.String> getIUsToInstall(java.util.Set<org.apache.maven.artifact.Artifact> testHarnessArtifacts)
-
getProjectType
private BundleProject getProjectType()
-
createEclipseInstallation
private EquinoxInstallation createEclipseInstallation() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getExtraDependencies
private java.util.List<org.apache.maven.model.Dependency> getExtraDependencies()
-
getTestBundleSymbolicName
private java.lang.String getTestBundleSymbolicName()
-
getBundleArtifactKey
private ArtifactKey getBundleArtifactKey(java.io.File file) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getTestDependencies
private java.util.List<org.apache.maven.model.Dependency> getTestDependencies()
-
newBundleDependency
protected org.apache.maven.model.Dependency newBundleDependency(java.lang.String bundleId)
-
createSurefireProperties
private void createSurefireProperties(TestFrameworkProvider provider) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getMergedProviderProperties
protected java.util.Properties getMergedProviderProperties() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
scanForTests
protected org.apache.maven.surefire.api.util.ScanResult scanForTests()
-
storeProperties
private void storeProperties(java.util.Map<java.lang.String,java.lang.String> propertiesMap, java.io.File file) throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
runTest
private void runTest(EquinoxInstallation testRuntime) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
getToolchain
protected org.apache.maven.toolchain.Toolchain getToolchain() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
createCommandLine
LaunchConfiguration createCommandLine(EquinoxInstallation testRuntime) throws java.net.MalformedURLException, org.apache.maven.plugin.MojoExecutionException
- Throws:
java.net.MalformedURLExceptionorg.apache.maven.plugin.MojoExecutionException
-
getMergedSystemProperties
private java.util.Map<java.lang.String,java.lang.String> getMergedSystemProperties()
-
addCustomProfileArg
private void addCustomProfileArg(EquinoxLaunchConfiguration cli) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
propertiesAsMap
private java.util.Map<java.lang.String,java.lang.String> propertiesAsMap(java.util.Properties p)
-
addProgramArgs
void addProgramArgs(EquinoxLaunchConfiguration cli, java.lang.String... arguments)
-
splitArgLine
java.lang.String[] splitArgLine(java.lang.String argLine) throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getTestApplication
private java.lang.String getTestApplication(EquinoxInstallationDescription testRuntime)
-
getBuildOutputDirectories
private java.lang.String getBuildOutputDirectories()
-
appendCommaSeparated
private static void appendCommaSeparated(java.lang.StringBuilder sb, java.lang.String string)
-
getBundlesToExplode
private java.util.List<java.lang.String> getBundlesToExplode()
-
getFrameworkExtensions
private java.util.List<java.io.File> getFrameworkExtensions() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-