diff --git a/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.gtk.linux.x86/.classpath b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.gtk.linux.x86/.classpath
new file mode 100644
index 0000000000..b78dcc1d22
--- /dev/null
+++ b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.gtk.linux.x86/.classpath
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.gtk.linux.x86/META-INF/MANIFEST.MF b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.gtk.linux.x86/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..588926e393
--- /dev/null
+++ b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.gtk.linux.x86/META-INF/MANIFEST.MF
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Fragment-Host: compiler.fragments.unmatchinginp2; bundle-version="[1.0.0,1.1.0)"
+Bundle-Name: %fragmentName
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: compiler.fragments.unmatchinginp2.gtk.linux.x86; singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-ManifestVersion: 2
+Bundle-Localization: fragment
+Export-Package: org.eclipse.swt.graphics
+Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86))
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.gtk.linux.x86/build.properties b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.gtk.linux.x86/build.properties
new file mode 100644
index 0000000000..444e0c6362
--- /dev/null
+++ b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.gtk.linux.x86/build.properties
@@ -0,0 +1,2 @@
+bin.includes = .,META-INF/
+source.. = src/
diff --git a/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.gtk.linux.x86/pom.xml b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.gtk.linux.x86/pom.xml
new file mode 100644
index 0000000000..5f0194ec52
--- /dev/null
+++ b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.gtk.linux.x86/pom.xml
@@ -0,0 +1,31 @@
+
+
+ 4.0.0
+
+
+ org.eclipse.tycho.compiler.fragments.unmatchinginp2
+ parent
+ 0.0.1-SNAPSHOT
+
+
+ compiler.fragments.unmatchinginp2.gtk.linux.x86
+ 1.0.0-SNAPSHOT
+ eclipse-plugin
+
+
+
+ org.eclipse.tycho
+ target-platform-configuration
+
+
+ ignore
+
+ true
+
+
+
+
+
+
+
diff --git a/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.gtk.linux.x86/src/org/eclipse/swt/graphics/Image.java b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.gtk.linux.x86/src/org/eclipse/swt/graphics/Image.java
new file mode 100644
index 0000000000..67349649b8
--- /dev/null
+++ b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.gtk.linux.x86/src/org/eclipse/swt/graphics/Image.java
@@ -0,0 +1,7 @@
+package org.eclipse.swt.graphics;
+
+public final class Image {
+ public static void test() {
+ Image2 instanceOfClassFromUnmatchingFragment = new Image2();
+ }
+}
diff --git a/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.gtk.linux.x86/test/org/eclipse/swt/graphics/ImageTest.java b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.gtk.linux.x86/test/org/eclipse/swt/graphics/ImageTest.java
new file mode 100644
index 0000000000..d352f06385
--- /dev/null
+++ b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.gtk.linux.x86/test/org/eclipse/swt/graphics/ImageTest.java
@@ -0,0 +1,8 @@
+package org.eclipse.swt.graphics;
+
+public final class ImageTest {
+ public static void test() {
+ Image2 instanceOfClassFromUnmatchingFragment = new Image2();
+ }
+
+}
diff --git a/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.unmatching/.classpath b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.unmatching/.classpath
new file mode 100644
index 0000000000..574689a648
--- /dev/null
+++ b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.unmatching/.classpath
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.unmatching/META-INF/MANIFEST.MF b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.unmatching/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..65bc8bb3da
--- /dev/null
+++ b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.unmatching/META-INF/MANIFEST.MF
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Fragment-Host: compiler.fragments.unmatchinginp2;bundle-version="[1.0.0,1.1.0)"
+Bundle-Name: %fragmentName
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: compiler.fragments.unmatchinginp2.unmatching; singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-ManifestVersion: 2
+Bundle-Localization: fragment
+Export-Package: org.eclipse.swt.graphics
+Eclipse-PlatformFilter: (& (osgi.ws=unknown) (osgi.os=unknown) (osgi.arch=unknown))
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.unmatching/build.properties b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.unmatching/build.properties
new file mode 100644
index 0000000000..444e0c6362
--- /dev/null
+++ b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.unmatching/build.properties
@@ -0,0 +1,2 @@
+bin.includes = .,META-INF/
+source.. = src/
diff --git a/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.unmatching/pom.xml b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.unmatching/pom.xml
new file mode 100644
index 0000000000..4e7067315b
--- /dev/null
+++ b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.unmatching/pom.xml
@@ -0,0 +1,31 @@
+
+
+ 4.0.0
+
+
+ org.eclipse.tycho.compiler.fragments.unmatchinginp2
+ parent
+ 0.0.1-SNAPSHOT
+
+
+ compiler.fragments.unmatchinginp2.unmatching
+ 1.0.0-SNAPSHOT
+ eclipse-plugin
+
+
+
+ org.eclipse.tycho
+ target-platform-configuration
+
+
+ ignore
+
+ true
+
+
+
+
+
+
+
diff --git a/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.unmatching/src/org/eclipse/swt/graphics/Image2.java b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.unmatching/src/org/eclipse/swt/graphics/Image2.java
new file mode 100644
index 0000000000..85e8443196
--- /dev/null
+++ b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2.unmatching/src/org/eclipse/swt/graphics/Image2.java
@@ -0,0 +1,4 @@
+package org.eclipse.swt.graphics;
+
+public final class Image2 {
+}
diff --git a/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2/META-INF/MANIFEST.MF b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..ea6ba18312
--- /dev/null
+++ b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2/META-INF/MANIFEST.MF
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+Bundle-Name: %pluginName
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: compiler.fragments.unmatchinginp2;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-ManifestVersion: 2
+Bundle-Localization: plugin
+Eclipse-ExtensibleAPI: true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2/META-INF/p2.inf b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2/META-INF/p2.inf
new file mode 100644
index 0000000000..bcac54bb27
--- /dev/null
+++ b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2/META-INF/p2.inf
@@ -0,0 +1,9 @@
+requires.1.namespace = org.eclipse.equinox.p2.iu
+requires.1.name = org.eclipse.swt.gtk.linux.x86
+requires.1.range = [$version$,$version$]
+requires.1.filter = (&(osgi.os=linux)(osgi.ws=gtk)(osgi.arch=x86)(!(org.eclipse.swt.buildtime=true)))
+
+requires.2.namespace = org.eclipse.equinox.p2.iu
+requires.2.name = org.eclipse.swt.unmatching
+requires.2.range = [$version$,$version$]
+requires.2.filter = (&(osgi.os=unmatching)(osgi.ws=unmatching)(osgi.arch=unmatching)(!(org.eclipse.swt.buildtime=true)))
\ No newline at end of file
diff --git a/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2/build.properties b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2/build.properties
new file mode 100644
index 0000000000..7b02ed4a05
--- /dev/null
+++ b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2/build.properties
@@ -0,0 +1,2 @@
+bin.includes = META-INF/
+
diff --git a/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2/pom.xml b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2/pom.xml
new file mode 100644
index 0000000000..8f4dd90218
--- /dev/null
+++ b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/compiler.fragments.unmatchinginp2/pom.xml
@@ -0,0 +1,32 @@
+
+
+ 4.0.0
+
+
+ org.eclipse.tycho.compiler.fragments.unmatchinginp2
+ parent
+ 0.0.1-SNAPSHOT
+
+
+ compiler.fragments.unmatchinginp2
+ 1.0.0-SNAPSHOT
+ eclipse-plugin
+
+
+
+ org.eclipse.tycho
+ target-platform-configuration
+
+
+ ignore
+
+ true
+
+
+
+
+
+
+
+
diff --git a/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/pom.xml b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/pom.xml
new file mode 100644
index 0000000000..2cac4a4ad0
--- /dev/null
+++ b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/pom.xml
@@ -0,0 +1,53 @@
+
+
+ 4.0.0
+
+ org.eclipse.tycho.compiler.fragments.unmatchinginp2
+ parent
+ 0.0.1-SNAPSHOT
+
+ pom
+
+
+ compiler.fragments.unmatchinginp2
+ compiler.fragments.unmatchinginp2.gtk.linux.x86
+
+
+
+
+
+
+ repo_with_fragment_not_matching_platform_filter
+ file:///${basedir}/../resources/p2withUnmatchingFragment
+ p2
+
+
+
+
+
+
+ org.eclipse.tycho
+ tycho-maven-plugin
+ ${tycho-version}
+ true
+
+
+ org.eclipse.tycho
+ target-platform-configuration
+ ${tycho-version}
+
+ false
+
+
+ linux
+ gtk
+ x86
+
+
+
+
+
+
+
+
diff --git a/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/resources/p2withUnmatchingFragment/artifacts.xml b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/resources/p2withUnmatchingFragment/artifacts.xml
new file mode 100644
index 0000000000..28a5cae941
--- /dev/null
+++ b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/resources/p2withUnmatchingFragment/artifacts.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/resources/p2withUnmatchingFragment/content.xml b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/resources/p2withUnmatchingFragment/content.xml
new file mode 100644
index 0000000000..7ddab88cf8
--- /dev/null
+++ b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/resources/p2withUnmatchingFragment/content.xml
@@ -0,0 +1,108 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (&(osgi.arch=unmatching)(osgi.os=unmatching)(osgi.ws=unmatching)(!(org.eclipse.swt.buildtime=true)))
+
+
+
+
+ (&(osgi.arch=x86)(osgi.os=linux)(osgi.ws=gtk)(!(org.eclipse.swt.buildtime=true)))
+
+
+
+
+ compiler.fragments.unmatchinginp2
+
+
+
+
+ (org.eclipse.update.install.sources=true)
+
+
+
+
+
+
+
+
+
+
+ Bundle-SymbolicName: compiler.fragments.unmatchinginp2;singleton:=true
Bundle-Version: 1.0.0.202409231244
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ compiler.fragments.unmatchinginp2.unmatching
+
+
+
+
+ (org.eclipse.update.install.sources=true)
+
+
+
+
+ (&(osgi.arch=unknown)(osgi.os=unknown)(osgi.ws=unknown))
+
+
+
+
+
+
+
+
+ Bundle-SymbolicName: compiler.fragments.unmatchinginp2.unmatching; singleton:=true
Bundle-Version: 1.0.0.202409231244
Fragment-Host: compiler.fragments.unmatchinginp2;bundle-version="[1.0.0,1.1.0)"
+
+
+
+
+
+
diff --git a/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/resources/p2withUnmatchingFragment/plugins/compiler.fragments.unmatchinginp2.unmatching_1.0.0.202409231244.jar b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/resources/p2withUnmatchingFragment/plugins/compiler.fragments.unmatchinginp2.unmatching_1.0.0.202409231244.jar
new file mode 100644
index 0000000000..6e72454592
Binary files /dev/null and b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/resources/p2withUnmatchingFragment/plugins/compiler.fragments.unmatchinginp2.unmatching_1.0.0.202409231244.jar differ
diff --git a/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/resources/p2withUnmatchingFragment/plugins/compiler.fragments.unmatchinginp2_1.0.0.202409231244.jar b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/resources/p2withUnmatchingFragment/plugins/compiler.fragments.unmatchinginp2_1.0.0.202409231244.jar
new file mode 100644
index 0000000000..bbe1b1df0b
Binary files /dev/null and b/tycho-its/projects/eeProfile.resolution.fragments.unmatchinginp2/resources/p2withUnmatchingFragment/plugins/compiler.fragments.unmatchinginp2_1.0.0.202409231244.jar differ
diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/eeProfile/FragmentsAttachedTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/eeProfile/FragmentsAttachedTest.java
index a52e8b032f..4597a1e334 100644
--- a/tycho-its/src/test/java/org/eclipse/tycho/test/eeProfile/FragmentsAttachedTest.java
+++ b/tycho-its/src/test/java/org/eclipse/tycho/test/eeProfile/FragmentsAttachedTest.java
@@ -12,6 +12,9 @@
*******************************************************************************/
package org.eclipse.tycho.test.eeProfile;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+import org.apache.maven.it.VerificationException;
import org.apache.maven.it.Verifier;
import org.eclipse.tycho.test.AbstractTychoIntegrationTest;
import org.junit.Test;
@@ -27,4 +30,11 @@ public void testSWTFragmentsAttached() throws Exception {
verifier.verifyErrorFreeLog();
}
+ @Test
+ public void testSWTFragmentsAttached_unmatchingFromP2() throws Exception {
+ Verifier verifier = getVerifier("eeProfile.resolution.fragments.unmatchinginp2", false);
+
+ assertThrows(VerificationException.class, () -> verifier.executeGoal("verify"));
+ }
+
}