diff --git a/sonar-orchestrator/src/main/java/com/sonar/orchestrator/locator/ArtifactoryFactory.java b/sonar-orchestrator/src/main/java/com/sonar/orchestrator/locator/ArtifactoryFactory.java index f448e181..9ecff638 100644 --- a/sonar-orchestrator/src/main/java/com/sonar/orchestrator/locator/ArtifactoryFactory.java +++ b/sonar-orchestrator/src/main/java/com/sonar/orchestrator/locator/ArtifactoryFactory.java @@ -26,7 +26,8 @@ public class ArtifactoryFactory { - private static final String DEFAULT_ARTIFACTORY_URL = "https://repox.jfrog.io/repox"; + private static final String DEFAULT_ARTIFACTORY_PREFIX = "https://repox.jfrog.io"; + private static final String DEFAULT_ARTIFACTORY_URL = DEFAULT_ARTIFACTORY_PREFIX + "/repox"; /** * Two types of Artifactory are supported: Maven and Default. @@ -40,7 +41,7 @@ public static Artifactory createArtifactory(Configuration configuration) { File downloadTempDir = new File(configuration.fileSystem().workspace(), "temp-downloads"); String baseUrl = defaultIfEmpty(configuration.getStringByKeys("orchestrator.artifactory.url", "ARTIFACTORY_URL"), DEFAULT_ARTIFACTORY_URL); - if (baseUrl.startsWith(DEFAULT_ARTIFACTORY_URL)) { + if (baseUrl.startsWith(DEFAULT_ARTIFACTORY_PREFIX)) { String accessToken = configuration.getStringByKeys("orchestrator.artifactory.accessToken", "ARTIFACTORY_ACCESS_TOKEN"); String apiKey = configuration.getStringByKeys("orchestrator.artifactory.apiKey", "ARTIFACTORY_API_KEY"); return new DefaultArtifactory(downloadTempDir, baseUrl, accessToken, apiKey);