diff --git a/tycho-its/projects/p2Repository/category.xml b/tycho-its/projects/p2Repository/category.xml index 1b42d0704d..7255e71d38 100644 --- a/tycho-its/projects/p2Repository/category.xml +++ b/tycho-its/projects/p2Repository/category.xml @@ -6,7 +6,7 @@ - id == "javax.annotation" + id == "jakarta.annotation-api" diff --git a/tycho-its/projects/product.crossReference/pom.xml b/tycho-its/projects/product.crossReference/pom.xml index b690b5edf9..cf5c7b2dc9 100644 --- a/tycho-its/projects/product.crossReference/pom.xml +++ b/tycho-its/projects/product.crossReference/pom.xml @@ -16,7 +16,7 @@ test-data-repo p2 - ${test-data-repo} + ${target-platform} diff --git a/tycho-its/projects/product.differentVersions/pom.xml b/tycho-its/projects/product.differentVersions/pom.xml index 28e180ce92..3d629ba806 100644 --- a/tycho-its/projects/product.differentVersions/pom.xml +++ b/tycho-its/projects/product.differentVersions/pom.xml @@ -11,7 +11,7 @@ 2.5.0-SNAPSHOT - https://download.eclipse.org/releases/2021-03/ + https://download.eclipse.org/releases/2021-03/ @@ -25,7 +25,7 @@ platform p2 - ${platform-url} + ${target-platform} diff --git a/tycho-its/projects/resolver.split/org.eclipse.equinox.security/pom.xml b/tycho-its/projects/resolver.split/org.eclipse.equinox.security/pom.xml index 01d3df53a8..32e651f987 100644 --- a/tycho-its/projects/resolver.split/org.eclipse.equinox.security/pom.xml +++ b/tycho-its/projects/resolver.split/org.eclipse.equinox.security/pom.xml @@ -24,7 +24,7 @@ repository p2 - ${repo} + ${target-platform} diff --git a/tycho-its/projects/surefire.bundleUnpack/pom.xml b/tycho-its/projects/surefire.bundleUnpack/pom.xml index c23c2ba791..28d5074b0f 100644 --- a/tycho-its/projects/surefire.bundleUnpack/pom.xml +++ b/tycho-its/projects/surefire.bundleUnpack/pom.xml @@ -11,10 +11,6 @@ tycho340.test - - http://download.eclipse.org/releases/latest - - p2 @@ -35,9 +31,6 @@ org.eclipse.tycho target-platform-configuration ${tycho-version} - - p2 - diff --git a/tycho-its/projects/surefire.bundleUnpack/tycho340.test/pom.xml b/tycho-its/projects/surefire.bundleUnpack/tycho340.test/pom.xml index e88fc5864c..e9972b0125 100644 --- a/tycho-its/projects/surefire.bundleUnpack/tycho340.test/pom.xml +++ b/tycho-its/projects/surefire.bundleUnpack/tycho340.test/pom.xml @@ -26,6 +26,7 @@ org.eclipse.tycho tycho-surefire-plugin + ${tycho-version} org.apache.ant diff --git a/tycho-its/projects/surefire.cli/bundle.tests/META-INF/MANIFEST.MF b/tycho-its/projects/surefire.cli/bundle.tests/META-INF/MANIFEST.MF index c6c3e56bbe..08a1e9f8ae 100644 --- a/tycho-its/projects/surefire.cli/bundle.tests/META-INF/MANIFEST.MF +++ b/tycho-its/projects/surefire.cli/bundle.tests/META-INF/MANIFEST.MF @@ -6,4 +6,4 @@ Bundle-Version: 0.0.1.qualifier Require-Bundle: bundle;bundle-version="0.0.1", org.junit;bundle-version="4.12.0", org.eclipse.core.runtime;bundle-version="3.2.0", - javax.annotation + jakarta.annotation-api diff --git a/tycho-its/projects/surefire.optionalDependencies.ignore/pom.xml b/tycho-its/projects/surefire.optionalDependencies.ignore/pom.xml index 6854c5ef97..442323f17d 100644 --- a/tycho-its/projects/surefire.optionalDependencies.ignore/pom.xml +++ b/tycho-its/projects/surefire.optionalDependencies.ignore/pom.xml @@ -11,7 +11,7 @@ eclipse-3.4 p2 - ${e342-repo} + ${target-platform} diff --git a/tycho-its/projects/surefire.optionalDependencies.reactor/pom.xml b/tycho-its/projects/surefire.optionalDependencies.reactor/pom.xml index 17714d03aa..f2dce37699 100644 --- a/tycho-its/projects/surefire.optionalDependencies.reactor/pom.xml +++ b/tycho-its/projects/surefire.optionalDependencies.reactor/pom.xml @@ -26,7 +26,7 @@ eclipse-3.4 p2 - ${e342-repo} + ${target-platform} diff --git a/tycho-its/projects/surefire.requireBundle.multipleVersions/pom.xml b/tycho-its/projects/surefire.requireBundle.multipleVersions/pom.xml index 6657fba908..150412e7a2 100755 --- a/tycho-its/projects/surefire.requireBundle.multipleVersions/pom.xml +++ b/tycho-its/projects/surefire.requireBundle.multipleVersions/pom.xml @@ -20,7 +20,7 @@ repo p2 - ${repo} + ${target-platform} diff --git a/tycho-its/projects/surefire.requireBundle/pom.xml b/tycho-its/projects/surefire.requireBundle/pom.xml index b8ed316b6e..0924022fbe 100755 --- a/tycho-its/projects/surefire.requireBundle/pom.xml +++ b/tycho-its/projects/surefire.requireBundle/pom.xml @@ -19,7 +19,7 @@ oxygen p2 - ${oxygen-repo} + ${target-platform} diff --git a/tycho-its/projects/tycho98/bundle.tests/META-INF/MANIFEST.MF b/tycho-its/projects/tycho98/bundle.tests/META-INF/MANIFEST.MF index c6c3e56bbe..08a1e9f8ae 100644 --- a/tycho-its/projects/tycho98/bundle.tests/META-INF/MANIFEST.MF +++ b/tycho-its/projects/tycho98/bundle.tests/META-INF/MANIFEST.MF @@ -6,4 +6,4 @@ Bundle-Version: 0.0.1.qualifier Require-Bundle: bundle;bundle-version="0.0.1", org.junit;bundle-version="4.12.0", org.eclipse.core.runtime;bundle-version="3.2.0", - javax.annotation + jakarta.annotation-api diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/compiler/CompilerClasspathEntryTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/compiler/CompilerClasspathEntryTest.java index 3439b42c49..7b54bc2053 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/compiler/CompilerClasspathEntryTest.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/compiler/CompilerClasspathEntryTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2021, 2022 Christoph Läubrich and others. + * Copyright (c) 2021, 2023 Christoph Läubrich and others. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -23,8 +23,8 @@ import org.apache.maven.it.VerificationException; import org.apache.maven.it.Verifier; +import org.eclipse.tycho.TychoConstants; import org.eclipse.tycho.test.AbstractTychoIntegrationTest; -import org.eclipse.tycho.test.util.EnvironmentUtil; import org.junit.Test; public class CompilerClasspathEntryTest extends AbstractTychoIntegrationTest { @@ -76,7 +76,7 @@ public void testLibEntry() throws Exception { @Test public void testDSComponents() throws Exception { Verifier verifier = getVerifier("tycho-ds", false, true); - verifier.setSystemProperty("repo-url", EnvironmentUtil.ECLIPSE_LATEST); + verifier.setSystemProperty("repo-url", TychoConstants.ECLIPSE_LATEST); // first test to consume from target platform verifyDs(verifier); // now test consume from maven directly diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/p2Repository/BasicP2RepositoryIntegrationTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/p2Repository/BasicP2RepositoryIntegrationTest.java index 39fc5fee9e..6332f862b4 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/p2Repository/BasicP2RepositoryIntegrationTest.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/p2Repository/BasicP2RepositoryIntegrationTest.java @@ -38,8 +38,7 @@ public class BasicP2RepositoryIntegrationTest extends AbstractTychoIntegrationTe @BeforeClass public static void executeBuild() throws Exception { - verifier = new BasicP2RepositoryIntegrationTest().getVerifier("/p2Repository", false); - verifier.addCliOption("-Dtest-data-repo=" + ResourceUtil.P2Repositories.ECLIPSE_LATEST.toString()); + verifier = new BasicP2RepositoryIntegrationTest().getVerifier("/p2Repository"); verifier.executeGoal("verify"); verifier.verifyErrorFreeLog(); p2Repo = P2RepositoryTool.forEclipseRepositoryModule(new File(verifier.getBasedir())); @@ -48,7 +47,7 @@ public static void executeBuild() throws Exception { @Test public void test381377BundleInclusion() { // check that (separately!) included bundle is there - assertTrue(p2Repo.getBundleArtifact("com.sun.el", "2.2.0.v201303151357").isFile()); + assertTrue(p2Repo.getBundleArtifact("com.sun.el.javax.el", "3.0.4").isFile()); } @Test @@ -61,10 +60,10 @@ public void testIncludedIUById() throws Exception { @Test public void testIncludeIUViaMatchQuery() throws Exception { - assertThat(p2Repo.getAllUnitIds(), hasItem("javax.annotation")); + assertThat(p2Repo.getAllUnitIds(), hasItem("jakarta.annotation-api")); IU categoryIU = p2Repo.getUniqueIU("Test Category"); - assertThat(categoryIU.getRequiredIds(), hasItem("javax.annotation")); + assertThat(categoryIU.getRequiredIds(), hasItem("jakarta.annotation-api")); } @Test diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/product/ProductMixedVersionsTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/product/ProductMixedVersionsTest.java index 9c0da351c7..d52a19856e 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/product/ProductMixedVersionsTest.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/product/ProductMixedVersionsTest.java @@ -22,14 +22,12 @@ import org.apache.maven.it.Verifier; import org.eclipse.tycho.test.AbstractTychoIntegrationTest; -import org.eclipse.tycho.test.util.ResourceUtil.P2Repositories; import org.junit.Test; public class ProductMixedVersionsTest extends AbstractTychoIntegrationTest { @Test public void testMixedPluginVersions() throws Exception { - Verifier verifier = getVerifier("product.differentVersions", false); - verifier.addCliOption("-Dplatform-url=" + P2Repositories.ECLIPSE_LATEST.toString()); + Verifier verifier = getVerifier("product.differentVersions"); verifier.executeGoals(Arrays.asList("clean", "verify")); verifier.verifyErrorFreeLog(); // check that simple configurator is there... diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/product/ReferenceBetweenProductsTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/product/ReferenceBetweenProductsTest.java index 6becf43d25..17dd477a19 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/product/ReferenceBetweenProductsTest.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/product/ReferenceBetweenProductsTest.java @@ -22,15 +22,13 @@ import org.apache.maven.it.Verifier; import org.eclipse.tycho.test.AbstractTychoIntegrationTest; import org.eclipse.tycho.test.util.P2RepositoryTool; -import org.eclipse.tycho.test.util.ResourceUtil.P2Repositories; import org.junit.Test; public class ReferenceBetweenProductsTest extends AbstractTychoIntegrationTest { @Test public void testProductCanReferenceProductFromDifferentModule() throws Exception { - Verifier verifier = getVerifier("product.crossReference", false); - verifier.addCliOption("-Dtest-data-repo=" + P2Repositories.ECLIPSE_LATEST.toString()); + Verifier verifier = getVerifier("product.crossReference"); verifier.executeGoal("verify"); verifier.verifyErrorFreeLog(); diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/resolver/SplitPackagesTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/resolver/SplitPackagesTest.java index 255f253d27..1605f6f7fe 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/resolver/SplitPackagesTest.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/resolver/SplitPackagesTest.java @@ -11,7 +11,6 @@ import org.apache.maven.it.Verifier; import org.eclipse.tycho.test.AbstractTychoIntegrationTest; -import org.eclipse.tycho.test.util.ResourceUtil.P2Repositories; import org.junit.Test; public class SplitPackagesTest extends AbstractTychoIntegrationTest { @@ -19,7 +18,6 @@ public class SplitPackagesTest extends AbstractTychoIntegrationTest { @Test public void testSplitPackage() throws Exception { Verifier verifier = getVerifier("/resolver.split/org.eclipse.equinox.security"); - verifier.addCliOption("-Drepo=" + P2Repositories.ECLIPSE_LATEST.toString()); verifier.executeGoal("compile"); verifier.verifyErrorFreeLog(); } diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/ExplodedTestDependenciesTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/ExplodedTestDependenciesTest.java index dcd472b791..f5c69ca9cf 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/ExplodedTestDependenciesTest.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/ExplodedTestDependenciesTest.java @@ -25,13 +25,13 @@ public class ExplodedTestDependenciesTest extends AbstractTychoIntegrationTest { public void testLocalMavenRepository() throws Exception { // project that marks org.apache.ant as "exploded" (unpacked) for the test // runtime -> supported since TYCHO-340 - Verifier v01 = getVerifier("surefire.bundleUnpack", true); + Verifier v01 = getVerifier("surefire.bundleUnpack"); v01.executeGoal("install"); v01.verifyErrorFreeLog(); // TODO this is only an indirect test; it should test that the bundles nested // jars are accessible as file URLs File antHome = new File(v01.getBasedir(), - "tycho340.test/target/work/plugins/org.apache.ant_1.10.12.v20211102-1452"); + "tycho340.test/target/work/plugins/org.apache.ant_1.10.14.v20230922-1200"); Assert.assertTrue(antHome.isDirectory()); } diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/OpenTest4JTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/OpenTest4JTest.java index 3185a4b8f3..631a248eef 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/OpenTest4JTest.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/OpenTest4JTest.java @@ -19,15 +19,13 @@ import org.apache.maven.it.Verifier; import org.eclipse.tycho.test.AbstractTychoIntegrationTest; -import org.eclipse.tycho.test.util.ResourceUtil.P2Repositories; import org.junit.Test; public class OpenTest4JTest extends AbstractTychoIntegrationTest { @Test public void testOpenTest4JUsage() throws Exception { - Verifier verifier = getVerifier("/surefire.opentest4j/bundle.test", false); - verifier.addCliOption("-Dtarget-platform=" + P2Repositories.ECLIPSE_LATEST.toString()); + Verifier verifier = getVerifier("/surefire.opentest4j/bundle.test", true); verifier.setSystemProperty("maven.test.error.ignore", Boolean.toString(true)); verifier.setSystemProperty("maven.test.failure.ignore", Boolean.toString(true)); diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/RequireBundleTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/RequireBundleTest.java index bfbd589b5f..cd9fb40557 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/RequireBundleTest.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/RequireBundleTest.java @@ -14,7 +14,6 @@ import org.apache.maven.it.Verifier; import org.eclipse.tycho.test.AbstractTychoIntegrationTest; -import org.eclipse.tycho.test.util.ResourceUtil.P2Repositories; import org.junit.Test; public class RequireBundleTest extends AbstractTychoIntegrationTest { @@ -22,16 +21,14 @@ public class RequireBundleTest extends AbstractTychoIntegrationTest { // requested in bug 485926 @Test public void loadResourceFromRequireBundle() throws Exception { - Verifier verifier = getVerifier("/surefire.requireBundle", false, true); - verifier.addCliOption("-Doxygen-repo=" + P2Repositories.ECLIPSE_LATEST.toString()); + Verifier verifier = getVerifier("/surefire.requireBundle", true, true); verifier.executeGoal("integration-test"); verifier.verifyErrorFreeLog(); } @Test public void requireMultipleVersionsOfABundle() throws Exception { - Verifier verifier = getVerifier("/surefire.requireBundle.multipleVersions", false, true); - verifier.addCliOption("-Drepo=" + P2Repositories.ECLIPSE_LATEST.toString()); + Verifier verifier = getVerifier("/surefire.requireBundle.multipleVersions", true, true); verifier.executeGoal("integration-test"); verifier.verifyErrorFreeLog(); } diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/TestOptionalDependenciesTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/TestOptionalDependenciesTest.java index 79fb52bc25..1378804ce9 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/TestOptionalDependenciesTest.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/surefire/TestOptionalDependenciesTest.java @@ -14,7 +14,6 @@ import org.apache.maven.it.Verifier; import org.eclipse.tycho.test.AbstractTychoIntegrationTest; -import org.eclipse.tycho.test.util.ResourceUtil; import org.junit.Test; public class TestOptionalDependenciesTest extends AbstractTychoIntegrationTest { @@ -23,8 +22,7 @@ public class TestOptionalDependenciesTest extends AbstractTychoIntegrationTest { // they are conflicting (cf. bug 351842) @Test public void testIgnoreMutuallyExclusiveOptionalDependenciesForTestRuntimeComputation() throws Exception { - Verifier verifier = getVerifier("/surefire.optionalDependencies.ignore", false); - verifier.addCliOption("-De342-repo=" + ResourceUtil.P2Repositories.ECLIPSE_LATEST.toString()); + Verifier verifier = getVerifier("/surefire.optionalDependencies.ignore", true); verifier.executeGoal("verify"); verifier.verifyErrorFreeLog(); } // see also OptionalDependenciesTest.testOptionallyRequiredBundleCanBeIgnored() @@ -33,8 +31,7 @@ public void testIgnoreMutuallyExclusiveOptionalDependenciesForTestRuntimeComputa // project (bug 367701) @Test public void reactorIndirectOptionalDependencies() throws Exception { - Verifier verifier = getVerifier("/surefire.optionalDependencies.reactor", false); - verifier.addCliOption("-De342-repo=" + ResourceUtil.P2Repositories.ECLIPSE_LATEST.toString()); + Verifier verifier = getVerifier("/surefire.optionalDependencies.reactor", true); verifier.executeGoal("verify"); verifier.verifyErrorFreeLog(); } diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/util/ResourceUtil.java b/tycho-its/src/test/java/org/eclipse/tycho/test/util/ResourceUtil.java index 4036894c67..683a324d7b 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/util/ResourceUtil.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/util/ResourceUtil.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2022 SAP AG and others. + * Copyright (c) 2011, 2023 SAP AG and others. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -15,6 +15,8 @@ import java.io.File; import java.net.URI; +import org.eclipse.tycho.TychoConstants; + /** * Helper for accessing test resources. */ @@ -22,7 +24,7 @@ public class ResourceUtil { public enum P2Repositories { ECLIPSE_342("e342"), ECLIPSE_352("e352"), ECLIPSE_OXYGEN("https:////download.eclipse.org/releases/oxygen/"), - ECLIPSE_LATEST(EnvironmentUtil.ECLIPSE_LATEST); + ECLIPSE_LATEST(TychoConstants.ECLIPSE_LATEST); private final String path; diff --git a/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java b/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java index ff151e3791..e77b2f2768 100644 --- a/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java +++ b/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2022 Sonatype Inc. and others. + * Copyright (c) 2008, 2023 Sonatype Inc. and others. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -124,7 +124,7 @@ protected Verifier getVerifier(String test, boolean setTargetPlatform, File user tmpDir.mkdirs(); verifier.addCliOption("-Djava.io.tmpdir=" + tmpDir.getAbsolutePath()); if (setTargetPlatform) { - verifier.addCliOption("-Dtarget-platform=" + getTargetPlatform()); + verifier.addCliOption("-Dtarget-platform=" + getTargetPlatform().replace("/", "//")); } if (ignoreLocalArtifacts) { verifier.addCliOption("-Dtycho.localArtifacts=ignore"); diff --git a/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/util/EnvironmentUtil.java b/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/util/EnvironmentUtil.java index c6ee6dfc73..4c09d8edeb 100644 --- a/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/util/EnvironmentUtil.java +++ b/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/util/EnvironmentUtil.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2020 Sonatype Inc. and others. + * Copyright (c) 2008, 2023 Sonatype Inc. and others. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -24,6 +24,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.eclipse.tycho.TychoConstants; import org.eclipse.tycho.test.AbstractTychoIntegrationTest; /** @@ -36,8 +37,6 @@ public class EnvironmentUtil { private static final String MAVEN_HOME_INFO = "Maven home:"; - public static final String ECLIPSE_LATEST = "https:////download.eclipse.org/releases/2022-12/"; - private static final Properties props; static { @@ -85,7 +84,7 @@ public static boolean isMac() { } public static String getTargetPlatform() { - return ECLIPSE_LATEST; + return TychoConstants.ECLIPSE_LATEST; } public static String getTestSettings() {