diff --git a/lib/datasource/maven/__snapshots__/index.spec.ts.snap b/lib/datasource/maven/__snapshots__/index.spec.ts.snap index 8906027ab35a76..f8e722ebb6cb33 100644 --- a/lib/datasource/maven/__snapshots__/index.spec.ts.snap +++ b/lib/datasource/maven/__snapshots__/index.spec.ts.snap @@ -558,9 +558,11 @@ Object { "registryUrl": "https://custom.registry.renovatebot.com", "releases": Array [ Object { + "releaseTimestamp": "2020-01-01T01:00:00.000Z", "version": "1.0.0", }, Object { + "releaseTimestamp": "2020-01-01T02:00:00.000Z", "version": "2.0.0", }, ], diff --git a/lib/datasource/maven/util.ts b/lib/datasource/maven/util.ts index f1e1f415c7d8b5..0c4670412c6302 100644 --- a/lib/datasource/maven/util.ts +++ b/lib/datasource/maven/util.ts @@ -115,12 +115,8 @@ export async function isHttpResourceExists( try { const httpClient = httpByHostType(hostType); const res = await httpClient.head(pkgUrl.toString()); - const pkgUrlHost = url.parse(pkgUrl.toString()).host; - if (['repo.maven.apache.org', 'gitlab.com'].includes(pkgUrlHost)) { - const timestamp = res?.headers?.['last-modified'] as string; - return timestamp || true; - } - return true; + const timestamp = res?.headers?.['last-modified'] as string; + return timestamp || true; } catch (err) { if (isNotFoundError(err)) { return false;