Skip to content

Commit

Permalink
Introduce option to assume that looked up maven data is specification…
Browse files Browse the repository at this point in the history
… compliant
  • Loading branch information
AB-xdev committed Nov 21, 2024
1 parent a4d8bff commit ff8d056
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
8 changes: 8 additions & 0 deletions docs/usage/self-hosted-experimental.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ See [issue 8660](https://github.com/renovatebot/renovate/issues/8660) for backgr

Skip initializing `RE2` for regular expressions and instead use Node-native `RegExp` instead.

## `RENOVATE_X_MAVEN_LOOKUP_ASSUME_SPECIFICATION_COMPLIANT`

If set to any value, Renovate assumes that the looked up [Maven Metadata](https://maven.apache.org/repositories/metadata.html) conforms to specification.
Enabling this will:

- not use the HTML index page for lookup
- not check if looked up `.pom` files exist

## `RENOVATE_X_NUGET_DOWNLOAD_NUPKGS`

If set to any value, Renovate will download `nupkg` files for determining package metadata.
Expand Down
11 changes: 9 additions & 2 deletions lib/modules/datasource/maven/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ export class MavenDatasource extends Datasource {
dependency: MavenDependency,
repoUrl: string,
): Promise<ReleaseMap> {
if (!repoUrl.startsWith(MAVEN_REPO)) {
if (
process.env.RENOVATE_X_MAVEN_LOOKUP_ASSUME_SPECIFICATION_COMPLIANT ||
!repoUrl.startsWith(MAVEN_REPO)
) {
return inputReleaseMap;
}

Expand Down Expand Up @@ -261,7 +264,11 @@ export class MavenDatasource extends Datasource {
{ packageName, registryUrl }: PostprocessReleaseConfig,
release: Release,
): Promise<PostprocessReleaseResult> {
if (!packageName || !registryUrl) {
if (
process.env.RENOVATE_X_MAVEN_LOOKUP_ASSUME_SPECIFICATION_COMPLIANT ||
!packageName ||
!registryUrl
) {
return release;
}

Expand Down

0 comments on commit ff8d056

Please sign in to comment.