diff --git a/ui/org.eclipse.pde.ui.tests/META-INF/MANIFEST.MF b/ui/org.eclipse.pde.ui.tests/META-INF/MANIFEST.MF index 9955a31093..9531835e30 100644 --- a/ui/org.eclipse.pde.ui.tests/META-INF/MANIFEST.MF +++ b/ui/org.eclipse.pde.ui.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: PDE JUnit Tests Bundle-SymbolicName: org.eclipse.pde.ui.tests; singleton:=true -Bundle-Version: 3.12.400.qualifier +Bundle-Version: 3.12.500.qualifier Bundle-ClassPath: tests.jar Bundle-Activator: org.eclipse.pde.ui.tests.PDETestsPlugin Bundle-Vendor: Eclipse.org diff --git a/ui/org.eclipse.pde.ui.tests/pom.xml b/ui/org.eclipse.pde.ui.tests/pom.xml index 6f5824a283..72b9feeca1 100644 --- a/ui/org.eclipse.pde.ui.tests/pom.xml +++ b/ui/org.eclipse.pde.ui.tests/pom.xml @@ -18,14 +18,14 @@ ../../ org.eclipse.pde.ui.tests - 3.12.400-SNAPSHOT + 3.12.500-SNAPSHOT eclipse-test-plugin true - ${project.artifactId} - org.eclipse.pde.ui.tests.AllPDETests - -DDetectVMInstallationsJob.disabled=true + ${project.artifactId} + org.eclipse.pde.ui.tests.AllPDETests + -DDetectVMInstallationsJob.disabled=true @@ -45,6 +45,22 @@ + + org.eclipse.tycho + target-platform-configuration + + + + + + eclipse-feature + org.eclipse.pde + 0.0.0 + + + + + diff --git a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/core/tests/internal/classpath/ClasspathResolutionTest.java b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/core/tests/internal/classpath/ClasspathResolutionTest.java index 7529613c65..1677ad9897 100644 --- a/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/core/tests/internal/classpath/ClasspathResolutionTest.java +++ b/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/core/tests/internal/classpath/ClasspathResolutionTest.java @@ -62,12 +62,12 @@ public class ClasspathResolutionTest { @Rule public final TestRule deleteCreatedTestProjectsAfter = ProjectUtils.DELETE_CREATED_WORKSPACE_PROJECTS_AFTER; - private static String javaxAnnotationProviderBSN; + private static String jakartaAnnotationProviderBSN; @BeforeClass public static void getJavaxAnnotationProviderBSN() { Bundle bundle = FrameworkUtil.getBundle(jakarta.annotation.PostConstruct.class); - javaxAnnotationProviderBSN = bundle.getSymbolicName(); + jakartaAnnotationProviderBSN = bundle.getSymbolicName(); } @Test @@ -100,17 +100,17 @@ public void testImportSystemPackageDoesntAddExtraBundleJava11() throws Exception @Test public void testImportExternalPreviouslySystemPackageAddsExtraBundle() throws Exception { - loadTargetPlatform(javaxAnnotationProviderBSN); + loadTargetPlatform(jakartaAnnotationProviderBSN); IProject project = ProjectUtils.importTestProject("tests/projects/demoMissedExternalPackage"); // In Java 11, jakarta.annotation is not present, so the bundle *must* // be part of classpath List classpathEntries = getRequiredPluginContainerEntries(project); - assertThat(classpathEntries).anyMatch(filename -> filename.contains(javaxAnnotationProviderBSN)); + assertThat(classpathEntries).anyMatch(filename -> filename.contains(jakartaAnnotationProviderBSN)); } @Test public void testImportExternalPreviouslySystemPackageAddsExtraBundle_missingBREE() throws Exception { - loadTargetPlatform(javaxAnnotationProviderBSN); + loadTargetPlatform(jakartaAnnotationProviderBSN); IProject project = ProjectUtils.importTestProject("tests/projects/demoMissedExternalPackageNoBREE"); IExecutionEnvironment java11 = JavaRuntime.getExecutionEnvironmentsManager().getEnvironment("JavaSE-11"); @@ -118,24 +118,24 @@ public void testImportExternalPreviouslySystemPackageAddsExtraBundle_missingBREE // In Java 11, jakarta.annotation is not present, so the bundle *must* // be part of classpath, even if no BREE is specified List classpathEntries = getRequiredPluginContainerEntries(project); - assertThat(classpathEntries).anyMatch(filename -> filename.contains(javaxAnnotationProviderBSN)); + assertThat(classpathEntries).anyMatch(filename -> filename.contains(jakartaAnnotationProviderBSN)); } @Test public void testImportSystemPackageDoesntAddExtraBundleJava8() throws Exception { - loadTargetPlatform(javaxAnnotationProviderBSN); + loadTargetPlatform(jakartaAnnotationProviderBSN); try (var mocked = mockExtraExtraJRESystemPackages("JavaSE-1.8", List.of("jakarta.annotation"))) { IProject project = ProjectUtils.importTestProject("tests/projects/demoMissedSystemPackageJava8"); // In Java 8, jakarta.annotation is present, so the bundle must // *NOT* be part of classpath List classpathEntries = getRequiredPluginContainerEntries(project); - assertThat(classpathEntries).isEmpty(); + assertThat(classpathEntries).noneMatch(filename -> filename.contains(jakartaAnnotationProviderBSN)); } } @Test public void testImportSystemPackageDoesntAddExtraBundleJava8_osgiEERequirement() throws Exception { - loadTargetPlatform(javaxAnnotationProviderBSN); + loadTargetPlatform(jakartaAnnotationProviderBSN); try (var mocked = mockExtraExtraJRESystemPackages("JavaSE-1.8", List.of("jakarta.annotation"))) { IProject project = ProjectUtils .importTestProject("tests/projects/demoMissedSystemPackageJava8OsgiEERequirement"); @@ -143,7 +143,7 @@ public void testImportSystemPackageDoesntAddExtraBundleJava8_osgiEERequirement() // Require-Capability // --> jakarta.annotation bundle must not be on the classpath List classpathEntries = getRequiredPluginContainerEntries(project); - assertThat(classpathEntries).isEmpty(); + assertThat(classpathEntries).noneMatch(filename -> filename.contains(jakartaAnnotationProviderBSN)); } }