Skip to content

Support Authentication in jvm_maven_import_external/java_import_external #7443

Closed

Description

@guw

Description of the problem:

With #6799 native.maven_rule is going away. It supported reading authentication credentials for a Maven repository from ~/.m2/settings.xml. jvm_maven_import_external (which is recommended as a replacement in #6799) does not support authentication.

Feature requests: what underlying problem are you trying to solve with this feature?

In certain networks access to public Maven Central is not possible. Instead people have to go through an internal Maven repository. This requires authentication. It must be possible to download jars from Maven repositories that require authentication.

Note, some Maven repositories do not support URL style submitting of username and password. Thus, it must be provided by a HTTP header.

Notes:

Support for Basic Authentication should be sufficient in the first place.

Reading username/password from ~/.m2/settings.xml would be ideal (convenient but not mandatory as long as it's decoupled from Bazel BUILD/WORKSPACE files).

Activity

  1. added
    team-ExternalDeps
    untriaged
    on Feb 19, 2019
  2. self-assigned this
    on Feb 21, 2019
  3. removed
    untriaged
    on Feb 21, 2019
  4. cgruber commented on Feb 23, 2019

    @cgruber
    Contributor

    I'm not sure if this is simply a problem with the rule... I don't see any particular mechanism to instruct repository_ctx.download() to use some authentication. I'm having a similar issue with bintray returning html login pages, instead of .pom files in Square's maven integration. :/

  5. guw commented on Feb 24, 2019

    @guw
    ContributorAuthor
  6. added
    P1
    on Mar 22, 2019
  7. meisterT commented on May 12, 2020

    @meisterT
    Member

    Is there anything left to do here?

  8. added
    untriaged
    and removed
    P1
    on May 12, 2020
  9. added
    team-OSS
    on Jun 15, 2020
  10. removed
    team-OSS
    on Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    team-ExternalDepstype: feature requestuntriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions