Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Oberlies2014-11-21 03:53:49 -0500
committerTobias Oberlies2014-11-21 04:58:55 -0500
commit911f7c68355a42f885ee7cee56be1da4e22e3de0 (patch)
tree0fc9da925b7c43cba3af0f46784111c6672d9913
parente0cef171f1cdc500f038cf14041951d993de710d (diff)
downloadorg.eclipse.tycho-911f7c68355a42f885ee7cee56be1da4e22e3de0.tar.gz
org.eclipse.tycho-911f7c68355a42f885ee7cee56be1da4e22e3de0.tar.xz
org.eclipse.tycho-911f7c68355a42f885ee7cee56be1da4e22e3de0.zip
448720 Remove <p> in site doc comments
- Remove <p> tags in site doc comments because they are only a partial workaround for the rugged indentation problem and cause undesired, additional blank lines in the parameters table. Also: - Fix warnings. - SAP SE is the legal successor of SAP AG. Bug: 448720
-rw-r--r--tycho-surefire/tycho-surefire-plugin/pom.xml1
-rw-r--r--tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/ParallelMode.java4
-rw-r--r--tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/TestMojo.java108
-rw-r--r--tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/AbstractJUnitProvider.java6
-rw-r--r--tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/JUnit3Provider.java7
-rw-r--r--tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/JUnit47Provider.java8
-rw-r--r--tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/JUnit4Provider.java7
-rw-r--r--tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/ProviderHelper.java5
-rw-r--r--tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/spi/TestFrameworkProvider.java4
-rw-r--r--tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/BundlesPublisher.java33
-rw-r--r--tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedEquinoxInstallation.java4
-rw-r--r--tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedInstallationBuilder.java6
-rw-r--r--tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedInstallationBuilderFactory.java4
-rw-r--r--tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedInstallationDescription.java17
-rw-r--r--tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/TestMojoTest.java4
-rw-r--r--tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/AbstractJUnitProviderTest.java4
-rw-r--r--tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/Junit3ProviderTest.java4
-rw-r--r--tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/Junit47ProviderTest.java4
-rw-r--r--tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/Junit4ProviderTest.java4
-rw-r--r--tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/ProviderHelperTest.java13
20 files changed, 94 insertions, 153 deletions
diff --git a/tycho-surefire/tycho-surefire-plugin/pom.xml b/tycho-surefire/tycho-surefire-plugin/pom.xml
index 7bcaa24f9..ca592a6e0 100644
--- a/tycho-surefire/tycho-surefire-plugin/pom.xml
+++ b/tycho-surefire/tycho-surefire-plugin/pom.xml
@@ -30,7 +30,6 @@
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-metadata</artifactId>
- <version>${plexusVersion}</version>
<executions>
<execution>
<goals>
diff --git a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/ParallelMode.java b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/ParallelMode.java
index 3a9acfa33..a828b3d53 100644
--- a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/ParallelMode.java
+++ b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/ParallelMode.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2012 SAP AG and others.
+ * Copyright (c) 2012 SAP SE and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * SAP AG - initial API and implementation
+ * SAP SE - initial API and implementation
*******************************************************************************/
package org.eclipse.tycho.surefire;
diff --git a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/TestMojo.java b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/TestMojo.java
index 6ad3bc612..3b73e3ab3 100644
--- a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/TestMojo.java
+++ b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/TestMojo.java
@@ -7,7 +7,7 @@
*
* Contributors:
* Sonatype Inc. - initial API and implementation
- * SAP AG - port to surefire 2.10
+ * SAP SE - port to surefire 2.10
* Mickael Istria (Red Hat Inc.) - 386988 Support for provisioned applications
******************************************************************************/
package org.eclipse.tycho.surefire;
@@ -110,11 +110,9 @@ import org.osgi.framework.Version;
public class TestMojo extends AbstractMojo {
/**
- * <p>
* Root directory (<a href=
* "http://help.eclipse.org/indigo/topic/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html#osgiinstallarea"
* >osgi.install.area</a>) of the Equinox runtime used to execute tests.
- * </p>
*/
@Parameter(defaultValue = "${project.build.directory}/work")
private File work;
@@ -139,42 +137,34 @@ public class TestMojo extends AbstractMojo {
private MavenProject project;
/**
- * <p>
* Set this parameter to suspend the test JVM waiting for a client to open a remote debug
* session on the specified port.
- * </p>
*/
@Parameter(property = "debugPort")
private int debugPort;
/**
- * <p>
* List of patterns (separated by commas) used to specify the tests that should be included in
* testing. When not specified and whent the <code>test</code> parameter is not specified, the
* default includes will be
* <code>**&#47;Test*.java **&#47;*Test.java **&#47;*TestCase.java</code>
- * </p>
*/
@Parameter
private List<String> includes;
/**
- * <p>
* List of patterns (separated by commas) used to specify the tests that should be excluded in
* testing. When not specified and when the <code>test</code> parameter is not specified, the
* default excludes will be <code>**&#47;*$*</code> (which excludes all inner classes).
- * </p>
*/
@Parameter
private List<String> excludes;
/**
- * <p>
* 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 <code>**&#47;${test}.java</code> When used, the <code>includes</code> and
* <code>excludes</code> patterns parameters are ignored
- * </p>
*/
@Parameter(property = "test")
private String test;
@@ -182,72 +172,57 @@ public class TestMojo extends AbstractMojo {
/**
* @deprecated Use skipTests instead.
*/
+ @Deprecated
@Parameter(property = "maven.test.skipExec")
private boolean skipExec;
/**
- * <p>
* Set this to "true" to skip running tests, but still compile them. Its use is NOT RECOMMENDED,
* but quite convenient on occasion. Default: <code>false</code>
- * </p>
*/
@Parameter(property = "skipTests")
private Boolean skipTests;
/**
- * <p>
* Same as {@link #skipTests}
- * </p>
*/
@Parameter(property = "maven.test.skip")
private Boolean skip;
/**
- * <p>
* If set to "false" the test execution will not fail in case there are no tests found.
- * </p>
*/
@Parameter(property = "failIfNoTests", defaultValue = "true")
private boolean failIfNoTests;
/**
- * <p>
* Set this to true to ignore a failure during testing. Its use is NOT RECOMMENDED, but quite
* convenient on occasion.
- * </p>
*/
@Parameter(property = "maven.test.failure.ignore", defaultValue = "false")
private boolean testFailureIgnore;
/**
- * <p>
* The directory containing generated test classes of the project being tested.
- * </p>
*/
@Parameter(property = "project.build.outputDirectory")
private File testClassesDirectory;
/**
- * <p>
* Enables -debug -consolelog for the test OSGi runtime
- * </p>
*/
@Parameter(property = "tycho.showEclipseLog", defaultValue = "false")
private boolean showEclipseLog;
/**
- * <p>
* Set this to "true" to redirect the unit test standard output to a file (found in
* reportsDirectory/testName-output.txt).
- * </p>
*/
@Parameter(property = "maven.test.redirectTestOutputToFile", defaultValue = "false")
private boolean redirectTestOutputToFile;
/**
- * <p>
* Base directory where all reports are written to.
- * </p>
*/
@Parameter(defaultValue = "${project.build.directory}/surefire-reports")
private File reportsDirectory;
@@ -256,33 +231,26 @@ public class TestMojo extends AbstractMojo {
private File surefireProperties;
/**
- * <p>
* Additional dependencies to be added to the test runtime.
- * </p>
- * <p>
+ *
* The dependencies specified here are &ndash; together with the dependencies specified in the
* <tt>MANIFEST.MF</tt> of the project &ndash; resolved against the target platform. The
* resulting set of bundles is included in the test runtime. Ignored if {@link #testRuntime} is
* <code>p2Installed</code>.
- * </p>
*/
@Parameter
private Dependency[] dependencies;
/**
- * <p>
* 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.
- * </p>
*/
@Parameter
private String application;
/**
- * <p>
* Eclipse product to be run, i.e. -product parameter passed to test Eclipse runtime.
- * </p>
*/
@Parameter
private String product;
@@ -291,17 +259,13 @@ public class TestMojo extends AbstractMojo {
private MavenSession session;
/**
- * <p>
* Run tests using UI (true) or headless (false) test harness.
- * </p>
*/
@Parameter(defaultValue = "false")
private boolean useUIHarness;
/**
- * <p>
* Run tests in UI (true) or background (false) thread. Only applies to UI test harness.
- * </p>
*/
@Parameter(defaultValue = "true")
private boolean useUIThread;
@@ -310,93 +274,71 @@ public class TestMojo extends AbstractMojo {
private List<Artifact> pluginArtifacts;
/**
- * <p>
* Arbitrary JVM options to set on the command line.
- * </p>
*/
@Parameter(property = "tycho.testArgLine")
private String argLine;
/**
- * <p>
* Arbitrary applications arguments to set on the command line.
- * </p>
*/
@Parameter
private String appArgLine;
/**
- * <p>
* Kill the forked test process after a certain number of seconds. If set to 0, wait forever for
* the process, never timing out.
- * </p>
*/
@Parameter(property = "surefire.timeout")
private int forkedProcessTimeoutInSeconds;
/**
- * <p>
* Bundle-SymbolicName of the test suite, a special bundle that knows how to locate and execute
* all relevant tests.
- * </p>
*
- * <p>
* testSuite and testClass identify single test class to run. All other tests will be ignored if
* both testSuite and testClass are provided. It is an error if provide one of the two
* parameters but not the other.
- * </p>
*/
@Parameter(property = "testSuite")
private String testSuite;
/**
- * <p>
* See testSuite
- * </p>
*/
@Parameter(property = "testClass")
private String testClass;
/**
- * <p>
* Additional environments to set for the forked test JVM.
- * </p>
*/
@Parameter
private Map<String, String> environmentVariables;
/**
- * <p>
* Additional system properties to set for the forked test JVM.
- * </p>
*/
@Parameter
private Map<String, String> systemProperties;
/**
- * <p>
* List of bundles that must be expanded in order to execute the tests. Ignored if
* {@link #testRuntime} is <code>p2Installed</code>.
- * </p>
*/
@Parameter
private String[] explodedBundles;
/**
- * <p>
* 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 if {@link #testRuntime} is <code>p2Installed</code>.
- * </p>
*/
@Parameter
private Dependency[] frameworkExtensions;
/**
- * <p>
* Bundle start level and auto start configuration used by the test runtime. Ignored if
* {@link #testRuntime} is <code>p2Installed</code>.
- * </p>
*/
@Parameter
private BundleStartLevel[] bundleStartLevel;
@@ -426,14 +368,12 @@ public class TestMojo extends AbstractMojo {
private OsgiBundleProject osgiBundle;
/**
- * <p>
* 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
* &quot;junit3&quot;,&quot;junit4&quot;,&quot;junit47&quot;. Note that when specifying a
* providerHint, you have to make sure the provider is actually available in the dependencies of
* tycho-surefire-plugin.
- * </p>
*
* @since 0.16.0
*/
@@ -441,11 +381,9 @@ public class TestMojo extends AbstractMojo {
private String providerHint;
/**
- * <p>
* 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".
- * </p>
*
* @since 0.19.0
*/
@@ -453,10 +391,8 @@ public class TestMojo extends AbstractMojo {
private String runOrder;
/**
- * <p>
* (JUnit 4.7 provider) Supports values "classes"/"methods"/"both" to run in separate threads,
* as controlled by threadCount.
- * </p>
*
* @since 0.16.0
*/
@@ -464,9 +400,7 @@ public class TestMojo extends AbstractMojo {
private ParallelMode parallel;
/**
- * <p>
* (JUnit 4.7 provider) Indicates that threadCount is per cpu core.
- * </p>
*
* @since 0.16.0
*/
@@ -474,11 +408,9 @@ public class TestMojo extends AbstractMojo {
private boolean perCoreThreadCount;
/**
- * <p>
* (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.
- * </p>
*
* @since 0.16.0
*/
@@ -486,11 +418,9 @@ public class TestMojo extends AbstractMojo {
private int threadCount = -1;
/**
- * <p>
* (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.
- * </p>
*
* @since 0.16.0
*/
@@ -498,9 +428,7 @@ public class TestMojo extends AbstractMojo {
private boolean useUnlimitedThreads;
/**
- * <p>
* Use this to specify surefire provider-specific properties.
- * </p>
*
* @since 0.16.0
*/
@@ -508,7 +436,6 @@ public class TestMojo extends AbstractMojo {
private Properties providerProperties = new Properties();
/**
- * <p>
* How to create the OSGi test runtime. Allowed values are <code>default</code> and
* <code>p2Installed</code>. Mode <code>p2Installed</code> is <b>EXPERIMENTAL</b> - only works
* when installing products under test (see below).
@@ -556,8 +483,6 @@ public class TestMojo extends AbstractMojo {
* &lt;/plugin&gt;
* </pre>
*
- * </p>
- *
* @since 0.19.0
*/
@Parameter(defaultValue = "default")
@@ -607,7 +532,7 @@ public class TestMojo extends AbstractMojo {
* The value of BREE will be matched against the id of the toolchain elements in toolchains.xml.
* </li>
* </ul>
- * <p>
+ *
* Example for BREE: <br>
* In <code>META-INF/MANIFEST.MF</code>:
*
@@ -630,12 +555,11 @@ public class TestMojo extends AbstractMojo {
* &lt;/toolchain&gt;
* &lt;/toolchains&gt;
* </pre>
- *
- * </p>
*/
@Parameter(defaultValue = "SYSTEM")
private JDKUsage useJDK;
+ @Override
public void execute() throws MojoExecutionException, MojoFailureException {
if (shouldSkip()) {
getLog().info("Skipping tests");
@@ -756,10 +680,12 @@ public class TestMojo extends AbstractMojo {
List<ReactorProject> reactorProjects = getReactorProjects();
final DependencyResolverConfiguration resolverConfiguration = new DependencyResolverConfiguration() {
+ @Override
public OptionalResolutionAction getOptionalResolutionAction() {
return OptionalResolutionAction.IGNORE;
}
+ @Override
public List<Dependency> getExtraRequirements() {
return extraDependencies;
}
@@ -894,7 +820,7 @@ public class TestMojo extends AbstractMojo {
Properties mergedProviderProperties = getMergedProviderProperties();
ScanResult scanResult = scanForTests();
scanResult.writeTo(mergedProviderProperties);
- for (Map.Entry entry : mergedProviderProperties.entrySet()) {
+ for (Map.Entry<?, ?> entry : mergedProviderProperties.entrySet()) {
p.put("__provider." + entry.getKey(), entry.getValue());
}
p.setProperty("testprovider", provider.getSurefireProviderClassName());
@@ -954,17 +880,6 @@ public class TestMojo extends AbstractMojo {
}
}
- private String getIncludesExcludes(List<String> patterns) {
- StringBuilder sb = new StringBuilder();
- for (String pattern : patterns) {
- if (sb.length() > 0) {
- sb.append(',');
- }
- sb.append(pattern);
- }
- return sb.toString();
- }
-
private void runTest(EquinoxInstallation testRuntime) throws MojoExecutionException, MojoFailureException {
int result;
try {
@@ -1093,12 +1008,7 @@ public class TestMojo extends AbstractMojo {
Properties customProfileProps = eeConfig.getFullSpecification().getProfileProperties();
File profileFile = new File(new File(project.getBuild().getDirectory()), "custom.profile");
storeProperties(customProfileProps, profileFile);
- try {
- cli.addVMArguments("-D" + EquinoxConfiguration.PROP_OSGI_JAVA_PROFILE + "=" + profileFile.toURL());
- } catch (MalformedURLException e) {
- // should not happen
- throw new RuntimeException(e);
- }
+ cli.addVMArguments("-D" + EquinoxConfiguration.PROP_OSGI_JAVA_PROFILE + "=" + profileFile.toURI());
}
}
diff --git a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/AbstractJUnitProvider.java b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/AbstractJUnitProvider.java
index 17f4687c7..a69f68b4b 100644
--- a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/AbstractJUnitProvider.java
+++ b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/AbstractJUnitProvider.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2012 SAP AG and others.
+ * Copyright (c) 2012 SAP SE and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * SAP AG - initial API and implementation
+ * SAP SE - initial API and implementation
*******************************************************************************/
package org.eclipse.tycho.surefire.provider.impl;
@@ -26,10 +26,12 @@ public abstract class AbstractJUnitProvider implements TestFrameworkProvider {
public AbstractJUnitProvider() {
}
+ @Override
public String getType() {
return "junit";
}
+ @Override
public boolean isEnabled(List<ClasspathEntry> testBundleClassPath, Properties surefireProperties) {
Set<String> junitBundleNames = getJUnitBundleNames();
VersionRange range = getJUnitVersionRange();
diff --git a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/JUnit3Provider.java b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/JUnit3Provider.java
index 1c8090d04..00116d4c7 100644
--- a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/JUnit3Provider.java
+++ b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/JUnit3Provider.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2012 SAP AG and others.
+ * Copyright (c) 2012 SAP SE and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * SAP AG - initial API and implementation
+ * SAP SE - initial API and implementation
*******************************************************************************/
package org.eclipse.tycho.surefire.provider.impl;
@@ -29,14 +29,17 @@ public class JUnit3Provider extends AbstractJUnitProvider {
private static final Version VERSION = Version.parseVersion("3.8.0");
+ @Override
public String getSurefireProviderClassName() {
return "org.apache.maven.surefire.junit.JUnit3Provider";
}
+ @Override
public Version getVersion() {
return VERSION;
}
+ @Override
public List<Dependency> getRequiredBundles() {
return singletonList(newDependency("org.eclipse.tycho", "org.eclipse.tycho.surefire.junit"));
}
diff --git a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/JUnit47Provider.java b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/JUnit47Provider.java
index 5d62d3df1..d9d1ebfd0 100644
--- a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/JUnit47Provider.java
+++ b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/JUnit47Provider.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2012 SAP AG and others.
+ * Copyright (c) 2012 SAP SE and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * SAP AG - initial API and implementation
+ * SAP SE - initial API and implementation
*******************************************************************************/
package org.eclipse.tycho.surefire.provider.impl;
@@ -32,6 +32,7 @@ public class JUnit47Provider extends AbstractJUnitProvider {
private static final Version VERSION = Version.parseVersion("4.7.0");
+ @Override
public boolean isEnabled(List<ClasspathEntry> testBundleClassPath, Properties surefireProperties) {
if (!isParallelEnabled(surefireProperties)) {
return false;
@@ -43,14 +44,17 @@ public class JUnit47Provider extends AbstractJUnitProvider {
return providerProperties.getProperty("parallel") != null;
}
+ @Override
public String getSurefireProviderClassName() {
return "org.apache.maven.surefire.junitcore.JUnitCoreProvider";
}
+ @Override
public Version getVersion() {
return VERSION;
}
+ @Override
public List<Dependency> getRequiredBundles() {
return singletonList(newDependency("org.eclipse.tycho", "org.eclipse.tycho.surefire.junit47"));
}
diff --git a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/JUnit4Provider.java b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/JUnit4Provider.java
index 21ff6e2d4..151a7bc63 100644
--- a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/JUnit4Provider.java
+++ b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/JUnit4Provider.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2012 SAP AG and others.
+ * Copyright (c) 2012 SAP SE and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * SAP AG - initial API and implementation
+ * SAP SE - initial API and implementation
*******************************************************************************/
package org.eclipse.tycho.surefire.provider.impl;
@@ -35,14 +35,17 @@ public class JUnit4Provider extends AbstractJUnitProvider {
return new HashSet<String>(asList("org.junit", "org.junit4"));
}
+ @Override
public String getSurefireProviderClassName() {
return "org.apache.maven.surefire.junit4.JUnit4Provider";
}
+ @Override
public Version getVersion() {
return VERSION;
}
+ @Override
public List<Dependency> getRequiredBundles() {
return singletonList(newDependency("org.eclipse.tycho", "org.eclipse.tycho.surefire.junit4"));
}
diff --git a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/ProviderHelper.java b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/ProviderHelper.java
index b83f6d89a..892299de5 100644
--- a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/ProviderHelper.java
+++ b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/impl/ProviderHelper.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 SAP AG and others.
+ * Copyright (c) 2012, 2013 SAP SE and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * SAP AG - initial API and implementation
+ * SAP SE - initial API and implementation
*******************************************************************************/
package org.eclipse.tycho.surefire.provider.impl;
@@ -40,6 +40,7 @@ public class ProviderHelper {
private static final Comparator<TestFrameworkProvider> VERSION_COMPARATOR = new Comparator<TestFrameworkProvider>() {
+ @Override
public int compare(TestFrameworkProvider p1, TestFrameworkProvider p2) {
return p1.getVersion().compareTo(p2.getVersion());
}
diff --git a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/spi/TestFrameworkProvider.java b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/spi/TestFrameworkProvider.java
index d1bf79a33..d355ae592 100644
--- a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/spi/TestFrameworkProvider.java
+++ b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provider/spi/TestFrameworkProvider.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2012 SAP AG and others.
+ * Copyright (c) 2012 SAP SE and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * SAP AG - initial API and implementation
+ * SAP SE - initial API and implementation
*******************************************************************************/
package org.eclipse.tycho.surefire.provider.spi;
diff --git a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/BundlesPublisher.java b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/BundlesPublisher.java
index cb2ea1b47..e1824f5b8 100644
--- a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/BundlesPublisher.java
+++ b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/BundlesPublisher.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2013 SAP AG and others.
+ * Copyright (c) 2013 SAP SE and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * SAP AG - initial API and implementation
+ * SAP SE - initial API and implementation
*******************************************************************************/
package org.eclipse.tycho.surefire.provisioning;
@@ -68,23 +68,20 @@ public class BundlesPublisher {
FileUtils.copyFileToDirectory(bundle, pluginsDir);
}
log.info("Publishing " + bundles.size() + " bundles to " + targetDirectory);
- try {
- launcher.setWorkingDirectory(workingDir);
- launcher.setApplicationName("org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher");
- launcher.addArguments("-artifactRepository", targetDirectory.toURL().toString(), //
- "-metadataRepository", targetDirectory.toURL().toString(),//
- "-compress", //
- "-publishArtifacts",//
- "-source",//
- targetDirectory.toString());
- int result = launcher.execute(timeoutInSeconds);
- if (result != 0) {
- throw new MojoFailureException("P2 publisher return code was " + result);
- }
- return targetDirectory.toURI();
- } catch (IOException ioe) {
- throw new MojoExecutionException("Unable to execute the publisher", ioe);
+ launcher.setWorkingDirectory(workingDir);
+ launcher.setApplicationName("org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher");
+ launcher.addArguments("-artifactRepository", targetDirectory.toURI().toString(), //
+ "-metadataRepository", targetDirectory.toURI().toString(),//
+ "-compress", //
+ "-publishArtifacts",//
+ "-source",//
+ targetDirectory.toString());
+ int result = launcher.execute(timeoutInSeconds);
+ if (result != 0) {
+ throw new MojoFailureException("P2 publisher return code was " + result);
}
+ return targetDirectory.toURI();
+
}
}
diff --git a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedEquinoxInstallation.java b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedEquinoxInstallation.java
index 4911a8481..b32723bbd 100644
--- a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedEquinoxInstallation.java
+++ b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedEquinoxInstallation.java
@@ -34,6 +34,7 @@ public class ProvisionedEquinoxInstallation implements EquinoxInstallation {
description = new ProvisionedInstallationDescription(location, bundleReader);
}
+ @Override
public File getLauncherJar() {
if (launcherJar != null) {
return launcherJar;
@@ -42,15 +43,18 @@ public class ProvisionedEquinoxInstallation implements EquinoxInstallation {
return launcherJar;
}
+ @Override
public File getLocation() {
return location;
}
+ @Override
public File getConfigurationLocation() {
// TODO should this be configurable?
return new File(getLocation(), "configuration");
}
+ @Override
public EquinoxInstallationDescription getInstallationDescription() {
return description;
}
diff --git a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedInstallationBuilder.java b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedInstallationBuilder.java
index fccb1f5d1..c407c44a7 100644
--- a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedInstallationBuilder.java
+++ b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedInstallationBuilder.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2013 SAP AG and others.
+ * Copyright (c) 2013 SAP SE and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * SAP AG - initial API and implementation
+ * SAP SE - initial API and implementation
*******************************************************************************/
package org.eclipse.tycho.surefire.provisioning;
@@ -141,7 +141,7 @@ public class ProvisionedInstallationBuilder {
assertNotEmpty(ius, "ius");
}
- private void assertNotEmpty(Collection collection, String name) {
+ private void assertNotEmpty(Collection<?> collection, String name) {
if (collection.isEmpty()) {
throw new IllegalStateException(name + " must not be empty");
}
diff --git a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedInstallationBuilderFactory.java b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedInstallationBuilderFactory.java
index e67c223f1..c1b1e8a87 100644
--- a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedInstallationBuilderFactory.java
+++ b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedInstallationBuilderFactory.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2013 SAP AG and others.
+ * Copyright (c) 2013 SAP SE and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * SAP AG - initial API and implementation
+ * SAP SE - initial API and implementation
*******************************************************************************/
package org.eclipse.tycho.surefire.provisioning;
diff --git a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedInstallationDescription.java b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedInstallationDescription.java
index b3c647a21..1c531f832 100644
--- a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedInstallationDescription.java
+++ b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/provisioning/ProvisionedInstallationDescription.java
@@ -42,12 +42,14 @@ public class ProvisionedInstallationDescription implements EquinoxInstallationDe
this.bundleReader = bundleReader;
}
+ @Override
public ArtifactDescriptor getSystemBundle() {
if (systemBundleDescriptor != null) {
return systemBundleDescriptor;
}
File pluginsDir = new File(location, "plugins");
File[] systemBundles = pluginsDir.listFiles(new FileFilter() {
+ @Override
public boolean accept(File file) {
return file.isFile() && file.getName().startsWith(EquinoxContainer.NAME + "_");
}
@@ -69,62 +71,77 @@ public class ProvisionedInstallationDescription implements EquinoxInstallationDe
return systemBundleDescriptor;
}
+ @Override
public List<File> getFrameworkExtensions() {
return Collections.emptyList();
}
+ @Override
public Set<String> getBundlesToExplode() {
return Collections.emptySet();
}
+ @Override
public Map<String, BundleStartLevel> getBundleStartLevel() {
return Collections.emptyMap();
}
+ @Override
public Map<String, String> getPlatformProperties() {
return Collections.emptyMap();
}
+ @Override
public Map<String, String> getDevEntries() {
return Collections.emptyMap();
}
+ @Override
public List<ArtifactDescriptor> getBundles() {
throw new UnsupportedOperationException();
}
+ @Override
public ArtifactDescriptor getBundle(String symbolicName, String highestVersion) {
throw new UnsupportedOperationException();
}
+ @Override
public void addBundle(ArtifactKey key, File basedir) {
throw new UnsupportedOperationException();
}
+ @Override
public void addBundle(ArtifactKey key, File basedir, boolean override) {
throw new UnsupportedOperationException();
}
+ @Override
public void addBundle(ArtifactDescriptor artifact) {
throw new UnsupportedOperationException();
}
+ @Override
public void addFrameworkExtensions(List<File> frameworkExtensions) {
throw new UnsupportedOperationException();
}
+ @Override
public void addBundlesToExplode(List<String> bundlesToExplode) {
throw new UnsupportedOperationException();
}
+ @Override
public void addBundleStartLevel(BundleStartLevel level) {
throw new UnsupportedOperationException();
}
+ @Override
public void addPlatformProperty(String property, String value) {
throw new UnsupportedOperationException();
}
+ @Override
public void addDevEntries(String id, String entries) {
throw new UnsupportedOperationException();
}
diff --git a/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/TestMojoTest.java b/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/TestMojoTest.java
index 22f3406d4..cf1eaf413 100644
--- a/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/TestMojoTest.java
+++ b/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/TestMojoTest.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 SAP AG and others.
+ * Copyright (c) 2010, 2011 SAP SE and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * SAP AG - initial API and implementation
+ * SAP SE - initial API and implementation
*******************************************************************************/
package org.eclipse.tycho.surefire;
diff --git a/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/AbstractJUnitProviderTest.java b/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/AbstractJUnitProviderTest.java
index a9c891754..41af7755f 100644
--- a/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/AbstractJUnitProviderTest.java
+++ b/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/AbstractJUnitProviderTest.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2012 SAP AG and others.
+ * Copyright (c) 2012 SAP SE and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * SAP AG - initial API and implementation
+ * SAP SE - initial API and implementation
*******************************************************************************/
package org.eclipse.tycho.surefire.provider.impl;
diff --git a/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/Junit3ProviderTest.java b/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/Junit3ProviderTest.java
index f6971c60f..deaaa0948 100644
--- a/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/Junit3ProviderTest.java
+++ b/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/Junit3ProviderTest.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2012 SAP AG and others.
+ * Copyright (c) 2012 SAP SE and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * SAP AG - initial API and implementation
+ * SAP SE - initial API and implementation
*******************************************************************************/
package org.eclipse.tycho.surefire.provider.impl;
diff --git a/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/Junit47ProviderTest.java b/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/Junit47ProviderTest.java
index 2a9d41a35..0b0f8993e 100644
--- a/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/Junit47ProviderTest.java
+++ b/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/Junit47ProviderTest.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2012 SAP AG and others.
+ * Copyright (c) 2012 SAP SE and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * SAP AG - initial API and implementation
+ * SAP SE - initial API and implementation
*******************************************************************************/
package org.eclipse.tycho.surefire.provider.impl;
diff --git a/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/Junit4ProviderTest.java b/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/Junit4ProviderTest.java
index 90c01a379..2caf0f1d2 100644
--- a/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/Junit4ProviderTest.java
+++ b/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/Junit4ProviderTest.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2012 SAP AG and others.
+ * Copyright (c) 2012 SAP SE and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * SAP AG - initial API and implementation
+ * SAP SE - initial API and implementation
*******************************************************************************/
package org.eclipse.tycho.surefire.provider.impl;
diff --git a/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/ProviderHelperTest.java b/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/ProviderHelperTest.java
index 0ab9b5933..7a352465a 100644
--- a/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/ProviderHelperTest.java
+++ b/tycho-surefire/tycho-surefire-plugin/src/test/java/org/eclipse/tycho/surefire/provider/impl/ProviderHelperTest.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 SAP AG and others.
+ * Copyright (c) 2012, 2013 SAP SE and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * SAP AG - initial API and implementation
+ * SAP SE - initial API and implementation
*******************************************************************************/
package org.eclipse.tycho.surefire.provider.impl;
@@ -109,29 +109,30 @@ public class ProviderHelperTest extends PlexusTestCase {
public void testMultipleProviderTypesFound() throws Exception {
TestFrameworkProvider anotherProvider = new TestFrameworkProvider() {
+ @Override
public boolean isEnabled(List<ClasspathEntry> testBundleClassPath, Properties surefireProperties) {
return true;
}
+ @Override
public Version getVersion() {
return new Version("1.0");
}
+ @Override
public String getType() {
return "another_test_fwk";
}
+ @Override
public String getSurefireProviderClassName() {
return "a.nother.test.framework.Provider";
}
+ @Override
public List<Dependency> getRequiredBundles() {
return emptyList();
}
-
- public List<String> getRequiredBundleSymbolicNames() {
- return emptyList();
- }
};
PlexusContainer container = getContainer();
container.addComponent(anotherProvider, TestFrameworkProvider.class, "another_test_fwk");

Back to the top