From 3ec91b280858c734f68e2c530100b916c620a5aa Mon Sep 17 00:00:00 2001 From: Rhys Arkins Date: Wed, 27 Sep 2023 14:29:17 +0200 Subject: [PATCH] feat(maven)!: use hunt strategy for registries (#24588) --- lib/modules/datasource/maven/index.spec.ts | 21 --------------------- lib/modules/datasource/maven/index.ts | 2 +- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/lib/modules/datasource/maven/index.spec.ts b/lib/modules/datasource/maven/index.spec.ts index fd29186ced1194..0f8cc2fb7573eb 100644 --- a/lib/modules/datasource/maven/index.spec.ts +++ b/lib/modules/datasource/maven/index.spec.ts @@ -277,27 +277,6 @@ describe('modules/datasource/maven/index', () => { expect(res).toMatchSnapshot(); }); - it('collects releases from all registry urls', async () => { - mockGenericPackage({ html: null }); - mockGenericPackage({ - base: baseUrlCustom, - meta: Fixtures.get('metadata-extra.xml'), - latest: '3.0.0', - jars: { '3.0.0': 200 }, - snapshots: [], - }); - - const res = await get('org.example:package', baseUrl, baseUrlCustom); - - expect(res?.releases).toMatchObject([ - { version: '0.0.1' }, - { version: '1.0.0' }, - { version: '1.0.3-SNAPSHOT' }, - { version: '2.0.0' }, - { version: '3.0.0' }, - ]); - }); - it('falls back to next registry url', async () => { mockGenericPackage({ html: null }); httpMock diff --git a/lib/modules/datasource/maven/index.ts b/lib/modules/datasource/maven/index.ts index a257edfcdeb526..f4e2862b78134c 100644 --- a/lib/modules/datasource/maven/index.ts +++ b/lib/modules/datasource/maven/index.ts @@ -66,7 +66,7 @@ export class MavenDatasource extends Datasource { override readonly defaultVersioning: string = mavenVersioning.id; - override readonly registryStrategy: RegistryStrategy = 'merge'; + override readonly registryStrategy: RegistryStrategy = 'hunt'; constructor(id = MavenDatasource.id) { super(id);