Skip to content

Commit

Permalink
Introduce a public static constant for the current eclipse release
Browse files Browse the repository at this point in the history
  • Loading branch information
laeubi authored and akurtakov committed Sep 28, 2023
1 parent 5118b99 commit 03e790c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 3 additions & 0 deletions tycho-api/src/main/java/org/eclipse/tycho/TychoConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Artifact> pluginArtifacts;

Expand Down Expand Up @@ -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()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}
Expand Down

0 comments on commit 03e790c

Please sign in to comment.