Skip to content

Commit a35721c

Browse files
authored
Update Maven package URI to use Maven Central (#2062)
Change the Maven package version check URI to use Maven Central.
1 parent d9b68f6 commit a35721c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

eng/scripts/Language-Settings.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ function SetPackageVersion ($PackageName, $Version, $ReleaseDate, $ReplaceLatest
5555
# Returns the maven (really sonatype) publish status of a package id and version.
5656
function IsMavenPackageVersionPublished($pkgId, $pkgVersion, $groupId)
5757
{
58-
$uri = "https://oss.sonatype.org/content/repositories/releases/$($groupId.Replace('.', '/'))/$pkgId/$pkgVersion/$pkgId-$pkgVersion.pom"
58+
# oss.sonatype.org seems to have started returning 403 for our agents. Based on https://central.sonatype.org/faq/403-error-central it is likely
59+
# because some agent is trying to query the directory too frequently. So we will attempt to query the raw maven repo itself.
60+
# $uri = "https://oss.sonatype.org/content/repositories/releases/$($groupId.Replace('.', '/'))/$pkgId/$pkgVersion/$pkgId-$pkgVersion.pom"
61+
$uri = "https://repo1.maven.org/maven2/$($groupId.Replace('.', '/'))/$pkgId/$pkgVersion/$pkgId-$pkgVersion.pom"
5962

6063
$attempt = 1
6164
while ($attempt -le 3)

0 commit comments

Comments
 (0)