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

adds --no-default to Coursier args so that we only use user-configured maven repos (Cherry-pick of #14581) (#14584) #14584

Merged

Conversation

chrisjrn
Copy link
Contributor

See-also: #14577


Per #14577, repo1.maven.org contains a bogus POM for jai_core. Coursier's behaviour is to look at its default repos before any user-configured repos, and will download the first POM it finds, regardless of whether it is valid. This means that even if you specify a repo that contains a valid POM, the invalid POM wins out because it is given priority.

Further, the repo1.maven.org behaviour is opaque, since we have our own --coursier-repos option.

This PR disables the default repos, so we only use the repos specified by the user.

When using --coursier-repos="['https://repo.osgeo.org/repository/geotools-releases', 'https://maven-central.storage-download.googleapis.com/maven2']", Pants is able to resolve jai_core.

…red maven repos (pantsbuild#14581)

Per pantsbuild#14577, `repo1.maven.org` contains a bogus POM for `jai_core`. Coursier's behaviour is to look at its default repos before any user-configured repos, and will download the first POM it finds, regardless of whether it is valid. This means that even if you specify a repo that contains a valid POM, the invalid POM wins out because it is given priority.

Further, the `repo1.maven.org` behaviour is opaque, since we have our own `--coursier-repos` option.

This PR disables the default repos, so we _only_ use the repos specified by the user.

When using `--coursier-repos="['https://repo.osgeo.org/repository/geotools-releases', 'https://maven-central.storage-download.googleapis.com/maven2']"`, Pants is able to resolve `jai_core`.


Closes pantsbuild#14577, cc @jvandew.
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
@chrisjrn chrisjrn requested a review from benjyw February 23, 2022 20:06
Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we use the PR title for the changelog, it should have the format of:

Original PR title (Cherry-pick of #14581)

Then when you click "Squash and merge", you will add to the very end the PR's own number, so

Original PR title (Cherry-pick of #14581) (#14584)

@chrisjrn chrisjrn changed the title Cherry-picks #14581 to 2.10 release branch adds --no-default to Coursier args so that we only use user-configured maven repos (Cherry-pick of #14581) (#14584) Feb 23, 2022
@chrisjrn chrisjrn merged commit 781bb1b into pantsbuild:2.10.x Feb 23, 2022
chrisjrn added a commit that referenced this pull request Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants