Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce option to assume that looked up maven data is specification compliant #32651

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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