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

Provide a more intuitive way to disable default repositories #3199

Open
ghostbuster91 opened this issue Sep 23, 2024 · 0 comments
Open

Provide a more intuitive way to disable default repositories #3199

ghostbuster91 opened this issue Sep 23, 2024 · 0 comments
Labels
coursier Issues tied with coursier integration. enhancement New feature or request UX

Comments

@ghostbuster91
Copy link
Contributor

Is your feature request related to a problem? Please describe.

When working in a corporate environment we often tend to use private instance of maven repository.
In such case it might be necessary to avoid reaching out to public repositories (e.g. maven central). This can be due to company policies or simply by wanting to avoid DDOSing the public infrastructure.

Currently, repositories for scala-cli can be added by --repository https://scala-cli.virtuslab.org/docs/reference/cli-options#--repository but there is no builtin way to remove the default ones (e.g. maven central).

Coursier exposes --no-default flag for this case but there is no way to pass this flag through scala-cli.

Describe the solution you'd like
Add equivalent of coursier's --no-default so that it is easy to opt-out from using public repositories.

Describe alternatives you've considered
So far I have been setting -Dcoursier.repositories=myprivate.maven.corp/maven|myprivate.maven.corp/maven-snapshots when calling scala-cli which works, but:

  • it wasn't straightforward to discover
  • it is not documented
  • seems potentially unsafe, as coursier is an implementation detail and this behavior could change.

Additional context
https://get-coursier.io/docs/other-repositories

@ghostbuster91 ghostbuster91 added the enhancement New feature or request label Sep 23, 2024
@Gedochao Gedochao added UX coursier Issues tied with coursier integration. labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coursier Issues tied with coursier integration. enhancement New feature or request UX
Projects
None yet
Development

No branches or pull requests

2 participants