diff --git a/tycho-its/projects/p2Repository.repositoryRef.targetresolution.ignore/META-INF/MANIFEST.MF b/tycho-its/projects/p2Repository.repositoryRef.targetresolution.ignore/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..a8ffcc8a80
--- /dev/null
+++ b/tycho-its/projects/p2Repository.repositoryRef.targetresolution.ignore/META-INF/MANIFEST.MF
@@ -0,0 +1,6 @@
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: p2Repository.repositoryRef.target;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.epsilon.picto
+Bundle-Name: p2Repository.repositoryRef.target
diff --git a/tycho-its/projects/p2Repository.repositoryRef.targetresolution.ignore/build.properties b/tycho-its/projects/p2Repository.repositoryRef.targetresolution.ignore/build.properties
new file mode 100644
index 0000000000..7594fab8d5
--- /dev/null
+++ b/tycho-its/projects/p2Repository.repositoryRef.targetresolution.ignore/build.properties
@@ -0,0 +1,2 @@
+bin.includes = META-INF/,\
+ .
diff --git a/tycho-its/projects/p2Repository.repositoryRef.targetresolution.ignore/pom.xml b/tycho-its/projects/p2Repository.repositoryRef.targetresolution.ignore/pom.xml
new file mode 100644
index 0000000000..e3d5a77795
--- /dev/null
+++ b/tycho-its/projects/p2Repository.repositoryRef.targetresolution.ignore/pom.xml
@@ -0,0 +1,42 @@
+
+
+ 4.0.0
+
+ tycho-its-project.p2Repository.repositoryRef.targetresolution
+ p2Repository.repositoryRef.target
+ 1.0.0-SNAPSHOT
+ eclipse-plugin
+
+
+
+
+ org.eclipse.tycho
+ tycho-maven-plugin
+ ${tycho-version}
+ true
+
+
+ org.eclipse.tycho
+ target-platform-configuration
+ ${tycho-version}
+
+
+
+ ${project.basedir}/test-target.target
+
+
+ ignore
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tycho-its/projects/p2Repository.repositoryRef.targetresolution.ignore/test-target.target b/tycho-its/projects/p2Repository.repositoryRef.targetresolution.ignore/test-target.target
new file mode 100644
index 0000000000..9047bf81e9
--- /dev/null
+++ b/tycho-its/projects/p2Repository.repositoryRef.targetresolution.ignore/test-target.target
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tycho-its/projects/p2Repository.repositoryRef.targetresolution.include/META-INF/MANIFEST.MF b/tycho-its/projects/p2Repository.repositoryRef.targetresolution.include/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..a8ffcc8a80
--- /dev/null
+++ b/tycho-its/projects/p2Repository.repositoryRef.targetresolution.include/META-INF/MANIFEST.MF
@@ -0,0 +1,6 @@
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: p2Repository.repositoryRef.target;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.epsilon.picto
+Bundle-Name: p2Repository.repositoryRef.target
diff --git a/tycho-its/projects/p2Repository.repositoryRef.targetresolution.include/build.properties b/tycho-its/projects/p2Repository.repositoryRef.targetresolution.include/build.properties
new file mode 100644
index 0000000000..7594fab8d5
--- /dev/null
+++ b/tycho-its/projects/p2Repository.repositoryRef.targetresolution.include/build.properties
@@ -0,0 +1,2 @@
+bin.includes = META-INF/,\
+ .
diff --git a/tycho-its/projects/p2Repository.repositoryRef.targetresolution.include/pom.xml b/tycho-its/projects/p2Repository.repositoryRef.targetresolution.include/pom.xml
new file mode 100644
index 0000000000..6cb001a4a9
--- /dev/null
+++ b/tycho-its/projects/p2Repository.repositoryRef.targetresolution.include/pom.xml
@@ -0,0 +1,40 @@
+
+
+ 4.0.0
+
+ tycho-its-project.p2Repository.repositoryRef.targetresolution
+ p2Repository.repositoryRef.target
+ 1.0.0-SNAPSHOT
+ eclipse-plugin
+
+
+
+
+ org.eclipse.tycho
+ tycho-maven-plugin
+ ${tycho-version}
+ true
+
+
+ org.eclipse.tycho
+ target-platform-configuration
+ ${tycho-version}
+
+
+
+ ${project.basedir}/test-target.target
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tycho-its/projects/p2Repository.repositoryRef.targetresolution.include/test-target.target b/tycho-its/projects/p2Repository.repositoryRef.targetresolution.include/test-target.target
new file mode 100644
index 0000000000..9047bf81e9
--- /dev/null
+++ b/tycho-its/projects/p2Repository.repositoryRef.targetresolution.include/test-target.target
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/p2Repository/RepoRefLocationP2RepositoryIntegrationTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/p2Repository/RepoRefLocationP2RepositoryIntegrationTest.java
index b56c63bbf3..ec13224e39 100644
--- a/tycho-its/src/test/java/org/eclipse/tycho/test/p2Repository/RepoRefLocationP2RepositoryIntegrationTest.java
+++ b/tycho-its/src/test/java/org/eclipse/tycho/test/p2Repository/RepoRefLocationP2RepositoryIntegrationTest.java
@@ -19,6 +19,7 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
import java.io.File;
import java.util.List;
@@ -84,6 +85,25 @@ public void testAdditionOfOnlyProvidingRepos() throws Exception {
new RepositoryReference("https://download.eclipse.org/cbi/updates/license", TYPE_METADATA, ENABLED)));
}
+ @Test
+ public void testTargetResolutionWithReferencedRepositoryInclude() throws Exception {
+ // include is the default
+ Verifier verifier = getVerifier("/p2Repository.repositoryRef.targetresolution.include", false);
+ verifier.executeGoal("package");
+ verifier.verifyErrorFreeLog();
+ }
+
+ @Test
+ public void testTargetResolutionWithReferencedRepositoryIgnore() throws Exception {
+ Verifier verifier = getVerifier("/p2Repository.repositoryRef.targetresolution.ignore", false);
+ try {
+ verifier.executeGoal("package");
+ fail("Build should fail due to missing transitive dependency dependency");
+ } catch (VerificationException e) {
+ verifier.verifyTextInLog("requires 'osgi.bundle; org.eclipse.emf.ecore 0.0.0' but it could not be found");
+ }
+ }
+
private List buildAndGetRepositoryReferences(String buildRoot, Consumer setup)
throws Exception, VerificationException {
Verifier verifier = getVerifier(buildRoot, false);