bazelbuild / rules_scala

Scala rules for Bazel
Apache License 2.0
360 stars 273 forks source link

Add support for netrc in jvm_maven_import_external #1509

Closed dmivankov closed 11 months ago

dmivankov commented 1 year ago

Description

auth= parameter for repository_ctx.download is both required to fetch from private registries and is not well-documented https://github.com/bazelbuild/bazel/issues/13709#issuecomment-1336699672

With this change

rules_scala_toolchain_deps_repositories(
    maven_servers = ["some_private_artifactory_url"]
)

would be able to authenticate using default .netrc (like ~/.netrc)

Motivation

Private maven registry could be useful to host patched versions of libraries or to ensure that there's a private persistent mirror for those artifacts