Skip to content

Commit 5dc2d4e

Browse files
weshaggardNetyyyy
authored andcommitted
Change Maven package version URI to repo1.maven.org (#46771)
(cherry picked from commit 211441d)
1 parent 7d6f2a1 commit 5dc2d4e

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
@@ -277,7 +277,10 @@ function Get-java-AdditionalValidationPackagesFromPackageSet {
277277
# Returns the maven (really sonatype) publish status of a package id and version.
278278
function IsMavenPackageVersionPublished($pkgId, $pkgVersion, $groupId)
279279
{
280-
$uri = "https://oss.sonatype.org/content/repositories/releases/$($groupId.Replace('.', '/'))/$pkgId/$pkgVersion/$pkgId-$pkgVersion.pom"
280+
# 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
281+
# because some agent is trying to query the directory too frequently. So we will attempt to query the raw maven repo itself.
282+
# $uri = "https://oss.sonatype.org/content/repositories/releases/$($groupId.Replace('.', '/'))/$pkgId/$pkgVersion/$pkgId-$pkgVersion.pom"
283+
$uri = "https://repo1.maven.org/maven2/$($groupId.Replace('.', '/'))/$pkgId/$pkgVersion/$pkgId-$pkgVersion.pom"
281284

282285
$attempt = 1
283286
while ($attempt -le 3)

0 commit comments

Comments
 (0)