diff --git a/org.eclipse.m2e.pde.target.tests/src/org/eclipse/m2e/pde/target/tests/OSGiMetadataGenerationTest.java b/org.eclipse.m2e.pde.target.tests/src/org/eclipse/m2e/pde/target/tests/OSGiMetadataGenerationTest.java index dee76b5ee8..2fa4fa9838 100644 --- a/org.eclipse.m2e.pde.target.tests/src/org/eclipse/m2e/pde/target/tests/OSGiMetadataGenerationTest.java +++ b/org.eclipse.m2e.pde.target.tests/src/org/eclipse/m2e/pde/target/tests/OSGiMetadataGenerationTest.java @@ -19,6 +19,7 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; +import java.net.URI; import java.util.Arrays; import java.util.List; import java.util.Optional; @@ -55,6 +56,34 @@ public void testBadDependencyInChain() throws Exception { assertStatusOk(getTargetStatus(target)); } + @Test + public void testWithClassifierFailsToCollect() throws Exception { + String targetXML = """ + + + + org.ehcache + ehcache + 3.10.0 + jar + jakarta + + + + """; + for (String deepth : new String[] { "none", "direct", "infinite" }) { + ITargetLocation target = resolveMavenTarget(targetXML.replace("%depth%", deepth)); + assertStatusOk(getTargetStatus(target)); + TargetBundle[] bundles = target.getBundles(); + // TODO check bundle and possible transtive dependencies! + for (TargetBundle targetBundle : bundles) { + URI location = targetBundle.getBundleInfo().getLocation(); + assertTrue(location.toString(), + location.toString().endsWith("org/ehcache/ehcache/3.10.0/ehcache-3.10.0-jakarta.jar")); + } + } + } + @Test public void testBadDependencyDirect() throws Exception { ITargetLocation target = resolveMavenTarget("""