Skip to content

incompatible_remove_native_maven_jar #6799

Closed

Description

@dkelmer

The native maven_jar rule will no longer be available with this flag set to true.


(Update: managed by @jin as of July 12)

A migration tool will be provided to automatically convert maven_jar targets to rules_jvm_external's maven_install rule, and modify BUILD files to use the new labels.

See https://docs.google.com/document/d/1CqxPv-TwvFWBHgtg7_QhVfck4vH4rnmCU_IuMdC7O2M/edit# for a design document of this migration tool.


Proposal by @dkelmer as of Nov 28, which is another valid migration solution that is done manually:

Use

load("@bazel_tools//tools/build_defs/repo:java.bzl", "java_import_external")

or the convenience wrapper

load("@bazel_tools//tools/build_defs/repo:jvm.bzl", "jvm_maven_import_external")

instead.

Given a WORKSPACE file that looks like the following:

maven_jar(
    name = "truth",
    artifact = "com.google.truth:truth:0.30",
    sha1 = "9d591b5a66eda81f0b88cf1c748ab8853d99b18b",
)

It will need to look like this after updating:

load("@bazel_tools//tools/build_defs/repo:jvm.bzl", "jvm_maven_import_external")
jvm_maven_import_external(
    name = "truth",
    artifact = "com.google.truth:truth:0.30",
    artifact_sha256 = "59721f0805e223d84b90677887d9ff567dc534d7c502ca903c0c2b17f05c116a",
    server_urls = ["http://central.maven.org/maven2"],
    licenses = ["notice"],  # Apache 2.0
)

Notably

Activity

  1. added
    incompatible-change
    on Nov 29, 2018
  2. changed the title [-]--incompatible_remove_native_maven_jar[/-] [+]incompatible_remove_native_maven_jar[/+] on Jan 2, 2019
  3. meteorcloudy commented on Jan 3, 2019

    @meteorcloudy
    Member

    This flag will break many projects in downstream, you can see the details at
    https://buildkite.com/bazel/bazel-at-release-plus-incompatible-flags/builds/48

    Please help them migrate (by filing issues and sending PRs and pinging the owners), thanks!

  4. dkelmer commented on Jan 16, 2019

    @dkelmer
    ContributorAuthor
  5. meisterT commented on Feb 3, 2019

    @meisterT
    Member

    cc @vladmos this is a classical example where buildifier could help with fixing the projects, because it's a mostly mechanical change

    Danna: it would be great if we could prioritize this migration, because the maven rules are one of the two "users" of the java.desktop module which contributes to 1/3 of the embedded JDK size.

  6. added a commit that references this issue on Feb 6, 2019
  7. dkelmer commented on Feb 6, 2019

    @dkelmer
    ContributorAuthor

    merged: bazelbuild/rules_gwt#20
    merged: bazelbuild/rules_appengine#96
    merged: https://critique.corp.google.com/#review/229611659&tab=a (intellij, SOT is internal)
    merged: grpc/grpc-java#5327
    merged: android/testing-samples#245
    filed issue: bazelbuild/BUILD_file_generator#48 (they use bazel-deps and updating requires updating their custom scripts so I'll leave that to them)

    rules_k8s is breaking because of grpc, so marking it as fixed

  8. added a commit that references this issue on Feb 7, 2019
  9. self-assigned this
    on Feb 7, 2019
  10. added a commit that references this issue on Feb 7, 2019
  11. 43 remaining items

  12. added
    P1
    and removed
    P2
    on Oct 15, 2019
  13. jin commented on Oct 30, 2019

    @jin
    Member

    Please see this document for a design proposal for a migration tool from maven_jar to rules_jvm_external.

  14. JLLeitschuh commented on Oct 31, 2019

    @JLLeitschuh

    Thanks! Cool to see progress on this!

  15. jin commented on Nov 14, 2019

    @jin
    Member

    The automated migration tool is available here: https://github.com/bazelbuild/rules_jvm_external/tree/master/migration

    If you don't wish to migrate to rules_jvm_external, please follow the alternative instructions to manually migrate to jvm_maven_import_external.

  16. added a commit that references this issue on Dec 19, 2019
  17. added a commit that references this issue on Dec 28, 2019
  18. added a commit that references this issue on Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1incompatible-change

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions