From 697ab9e352725e86df7be6eb700725fce5ba7eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20L=C3=A4ubrich?= Date: Thu, 28 Sep 2023 09:32:19 +0200 Subject: [PATCH] Introduce a public static constant for the current eclipse release (cherry picked from commit 03e790c5e290cead8b527838cc3060f5afe724f5) --- tycho-api/src/main/java/org/eclipse/tycho/TychoConstants.java | 3 +++ .../main/java/org/eclipse/tycho/apitools/ApiAnalysisMojo.java | 4 +--- .../eclipse/tycho/extras/docbundle/DocApplicationManager.java | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tycho-api/src/main/java/org/eclipse/tycho/TychoConstants.java b/tycho-api/src/main/java/org/eclipse/tycho/TychoConstants.java index 0c74f150a0..0eee2a5b22 100644 --- a/tycho-api/src/main/java/org/eclipse/tycho/TychoConstants.java +++ b/tycho-api/src/main/java/org/eclipse/tycho/TychoConstants.java @@ -16,6 +16,9 @@ import java.util.regex.Pattern; public interface TychoConstants { + + public static final String ECLIPSE_LATEST = "https://download.eclipse.org/releases/2023-09/"; + static final String ANY_QUALIFIER = "qualifier"; static final boolean USE_SMART_BUILDER = Boolean diff --git a/tycho-apitools-plugin/src/main/java/org/eclipse/tycho/apitools/ApiAnalysisMojo.java b/tycho-apitools-plugin/src/main/java/org/eclipse/tycho/apitools/ApiAnalysisMojo.java index e172c9e81a..48ca2904d3 100644 --- a/tycho-apitools-plugin/src/main/java/org/eclipse/tycho/apitools/ApiAnalysisMojo.java +++ b/tycho-apitools-plugin/src/main/java/org/eclipse/tycho/apitools/ApiAnalysisMojo.java @@ -77,8 +77,6 @@ public class ApiAnalysisMojo extends AbstractMojo { static final String BUNDLE_CORE = "org.eclipse.core.runtime"; - private static final String REPO_DEFAULT = "https://download.eclipse.org/releases/2023-06/"; - @Parameter(property = "plugin.artifacts") protected List pluginArtifacts; @@ -183,7 +181,7 @@ private boolean wasReplaced() { private MavenRepositoryLocation getRepository() { if (apiToolsRepository == null || apiToolsRepository.getUrl() == null) { - return new MavenRepositoryLocation(null, URI.create(REPO_DEFAULT)); + return new MavenRepositoryLocation(null, URI.create(TychoConstants.ECLIPSE_LATEST)); } return new MavenRepositoryLocation(apiToolsRepository.getId(), URI.create(apiToolsRepository.getUrl())); } diff --git a/tycho-extras/tycho-document-bundle-plugin/src/main/java/org/eclipse/tycho/extras/docbundle/DocApplicationManager.java b/tycho-extras/tycho-document-bundle-plugin/src/main/java/org/eclipse/tycho/extras/docbundle/DocApplicationManager.java index c9b77bddd2..9505e0a513 100644 --- a/tycho-extras/tycho-document-bundle-plugin/src/main/java/org/eclipse/tycho/extras/docbundle/DocApplicationManager.java +++ b/tycho-extras/tycho-document-bundle-plugin/src/main/java/org/eclipse/tycho/extras/docbundle/DocApplicationManager.java @@ -20,16 +20,16 @@ import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.eclipse.tycho.MavenRepositoryLocation; +import org.eclipse.tycho.TychoConstants; import org.eclipse.tycho.osgi.framework.EclipseApplication; import org.eclipse.tycho.osgi.framework.EclipseApplicationFactory; @Component(role = DocApplicationManager.class) public class DocApplicationManager { - private static final String REPO_DEFAULT = "https://download.eclipse.org/releases/2023-03/"; static MavenRepositoryLocation getRepository(Repository location) { if (location == null) { - return new MavenRepositoryLocation(null, URI.create(REPO_DEFAULT)); + return new MavenRepositoryLocation(null, URI.create(TychoConstants.ECLIPSE_LATEST)); } return new MavenRepositoryLocation(location.getId(), URI.create(location.getUrl())); }