Skip to content

Use rules_jvm_external #1670

Open
Open
@jadenPete

Description

@jadenPete

This issue is part of a broader proposal to merge some of the features in lucidsoftware/rules_scala into this ruleset.

The tracking issue for this effort

The relevant proposal section.

From the proposal:

bazelbuild/rules_scala uses the following rules/macros for fetching external dependencies from Maven (see scala/scala_maven_import_external.bzl).

  • java_import_external
  • jvm_import_external
  • jvm_maven_import_external
  • scala_import_external
  • scala_maven_import_external

The java_* and jvm_* rules/macros are copied from bazelbuild/bazel (see jvm.bzl and java.bzl), and the scala_* macros use them under the hood.

Today, rules_jvm_external is the standard for fetching external Java and Scala dependencies built with build systems other than Bazel (e.g. Maven), and, in lucidsoftware/rules_scala it’s worked quite well for us. The main advantages are:

  • Using external dependencies is as simple as importing rules_jvm_external
  • Downloaded artifacts, their checksums, and their versions are “pinned” into a file checked into the repository
  • External dependencies can be declared in a single maven_install target instead of each having to be declared in a separate target
  • It supports Bzlmod, which should ease a future migration

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions