diff --git a/tycho-its/projects/surefire.p2InstalledRuntime/example-feature/feature.xml b/tycho-its/projects/surefire.p2InstalledRuntime/example-feature/feature.xml
index a4119ef6a6..784edb8dd9 100644
--- a/tycho-its/projects/surefire.p2InstalledRuntime/example-feature/feature.xml
+++ b/tycho-its/projects/surefire.p2InstalledRuntime/example-feature/feature.xml
@@ -27,5 +27,12 @@
install-size="0"
version="0.0.0"
unpack="false"/>
+
+
diff --git a/tycho-its/projects/surefire.p2InstalledRuntime/example-plugin/META-INF/MANIFEST.MF b/tycho-its/projects/surefire.p2InstalledRuntime/example-plugin/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..a0defa8a43
--- /dev/null
+++ b/tycho-its/projects/surefire.p2InstalledRuntime/example-plugin/META-INF/MANIFEST.MF
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: spir.example-plugin
+Bundle-Version: 1.0.0
+Export-Package: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-11
diff --git a/tycho-its/projects/surefire.p2InstalledRuntime/example-plugin/build.properties b/tycho-its/projects/surefire.p2InstalledRuntime/example-plugin/build.properties
new file mode 100644
index 0000000000..ba31debd0e
--- /dev/null
+++ b/tycho-its/projects/surefire.p2InstalledRuntime/example-plugin/build.properties
@@ -0,0 +1,4 @@
+bin.includes = META-INF/,\
+ .
+output.. = target/classes/
+source.. = src/
diff --git a/tycho-its/projects/surefire.p2InstalledRuntime/example-plugin/pom.xml b/tycho-its/projects/surefire.p2InstalledRuntime/example-plugin/pom.xml
new file mode 100644
index 0000000000..9db6b982d3
--- /dev/null
+++ b/tycho-its/projects/surefire.p2InstalledRuntime/example-plugin/pom.xml
@@ -0,0 +1,25 @@
+
+
+
+ 4.0.0
+
+
+ tycho-its-project.surefire.p2InstalledRuntime
+ provisionedApplicationParent
+ 1.0.0
+
+
+ spir.example-plugin
+ eclipse-plugin
+
+
diff --git a/tycho-its/projects/surefire.p2InstalledRuntime/example-plugin/src/plugin/MyPlugin.java b/tycho-its/projects/surefire.p2InstalledRuntime/example-plugin/src/plugin/MyPlugin.java
new file mode 100644
index 0000000000..ae607ec19c
--- /dev/null
+++ b/tycho-its/projects/surefire.p2InstalledRuntime/example-plugin/src/plugin/MyPlugin.java
@@ -0,0 +1,9 @@
+package plugin;
+
+public class MyPlugin {
+
+ public String sayHello() {
+ return "Hello";
+ }
+
+}
\ No newline at end of file
diff --git a/tycho-its/projects/surefire.p2InstalledRuntime/pluginTest/META-INF/MANIFEST.MF b/tycho-its/projects/surefire.p2InstalledRuntime/pluginTest/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..593df2bc77
--- /dev/null
+++ b/tycho-its/projects/surefire.p2InstalledRuntime/pluginTest/META-INF/MANIFEST.MF
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: spir.pluginTest
+Bundle-Version: 1.0.0
+Require-Bundle: org.junit,
+ org.eclipse.core.runtime,
+ spir.example-plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-11
\ No newline at end of file
diff --git a/tycho-its/projects/surefire.p2InstalledRuntime/pluginTest/build.properties b/tycho-its/projects/surefire.p2InstalledRuntime/pluginTest/build.properties
new file mode 100644
index 0000000000..34d2e4d2da
--- /dev/null
+++ b/tycho-its/projects/surefire.p2InstalledRuntime/pluginTest/build.properties
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/tycho-its/projects/surefire.p2InstalledRuntime/pluginTest/pom.xml b/tycho-its/projects/surefire.p2InstalledRuntime/pluginTest/pom.xml
new file mode 100644
index 0000000000..cd2d25e986
--- /dev/null
+++ b/tycho-its/projects/surefire.p2InstalledRuntime/pluginTest/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+ 4.0.0
+
+
+ tycho-its-project.surefire.p2InstalledRuntime
+ provisionedApplicationParent
+ 1.0.0
+
+
+ spir.pluginTest
+
+ eclipse-test-plugin
+
+
+
+
+ org.eclipse.tycho
+ tycho-surefire-plugin
+ ${tycho-version}
+
+ p2Installed
+
+
+
+ org.eclipse.tycho
+ tycho-compiler-plugin
+ ${tycho-version}
+
+
+
+
+
diff --git a/tycho-its/projects/surefire.p2InstalledRuntime/pluginTest/src/testPlugin/PluginTest.java b/tycho-its/projects/surefire.p2InstalledRuntime/pluginTest/src/testPlugin/PluginTest.java
new file mode 100644
index 0000000000..67f456abc4
--- /dev/null
+++ b/tycho-its/projects/surefire.p2InstalledRuntime/pluginTest/src/testPlugin/PluginTest.java
@@ -0,0 +1,16 @@
+package testPlugin;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import plugin.MyPlugin;
+
+public class PluginTest extends TestCase {
+
+ public void testPlugin() throws Exception {
+ MyPlugin underTest = new MyPlugin();
+ assertEquals("Hello", underTest.sayHello());
+ }
+
+}
diff --git a/tycho-its/projects/surefire.p2InstalledRuntime/pom.xml b/tycho-its/projects/surefire.p2InstalledRuntime/pom.xml
index bc00df08cc..bf70d4eff3 100644
--- a/tycho-its/projects/surefire.p2InstalledRuntime/pom.xml
+++ b/tycho-its/projects/surefire.p2InstalledRuntime/pom.xml
@@ -30,6 +30,7 @@
+ example-plugin
example-feature
example-product
@@ -67,5 +68,12 @@
extProductTestDirector
+
+
+ noProduct
+
+ pluginTest
+
+
diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/P2InstalledTestRuntimeTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/P2InstalledTestRuntimeTest.java
index 1dab7e257e..567b6aeae5 100644
--- a/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/P2InstalledTestRuntimeTest.java
+++ b/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/P2InstalledTestRuntimeTest.java
@@ -13,7 +13,6 @@
package org.eclipse.tycho.test.surefire;
import java.util.List;
-
import org.apache.maven.it.Verifier;
import org.eclipse.tycho.TargetEnvironment;
import org.eclipse.tycho.test.AbstractTychoIntegrationTest;
@@ -62,6 +61,14 @@ public void testDifferentHarnessVersions() throws Exception {
verifier.verifyErrorFreeLog();
}
+ @Test
+ public void testNoProduct() throws Exception {
+ Verifier verifier = getVerifier("surefire.p2InstalledRuntime");
+ verifier.addCliOption("-PnoProduct");
+ verifier.executeGoals(List.of("clean", "integration-test"));
+ verifier.verifyErrorFreeLog();
+ }
+
private static String getProductClassifier() {
TargetEnvironment currentEnv = TargetEnvironment.getRunningEnvironment();
return String.join(".", currentEnv.getOs(), currentEnv.getWs(), currentEnv.getArch());