Skip to content

Commit

Permalink
feat(maven)!: use hunt strategy for registries (#24588)
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Sep 27, 2023
1 parent c11170f commit 3ec91b2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
21 changes: 0 additions & 21 deletions lib/modules/datasource/maven/index.spec.ts
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/datasource/maven/index.ts
Expand Up @@ -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);
Expand Down

0 comments on commit 3ec91b2

Please sign in to comment.