Git Product home page Git Product logo

Comments (5)

cheister avatar cheister commented on June 26, 2024 1

Fixed with #1037

from rules_jvm_external.

alex-shinn avatar alex-shinn commented on June 26, 2024

Actually, it looks like this error is coming from _http_file_impl in core bazel, though we probably need to fix both places.

from rules_jvm_external.

cheister avatar cheister commented on June 26, 2024

Interesting, I'm not surprised that the build package is creating a conflict.

I realize it's not ideal but I think you could workaround this for now by downloading the jar in your WORKSPACE with something like

http_file(
    name = "build_buf_protovalidate_0_1_9",
    sha256 = "d9c141bb6172c3a42283bde148f369772014d79bffc0f243a1da73b9da84e213",
    url = "https://repo.maven.apache.org/maven2/build/buf/protovalidate/0.1.9/protovalidate-0.1.9.jar",
)

and then set up a jvm_import rule in a BUILD file

load("@rules_jvm_external//private/rules:jvm_import.bzl", "jvm_import")

jvm_import(
    name = "build_buf_protovalidate",
    jars = ["build/buf/protovalidate/0.1.9/protovalidate-0.1.9.jar"],
    tags = [
        "maven_coordinates=build.buf:protovalidate:0.1.9",
        "maven_repository=https://maven.global.square/artifactory/square-public/",
        "maven_sha256=d9c141bb6172c3a42283bde148f369772014d79bffc0f243a1da73b9da84e213",
        "maven_url=https://maven.global.square/artifactory/square-public/build/buf/protovalidate/0.1.9/protovalidate-0.1.9.jar",
    ],
    visibility = ["//visibility:public"],
    deps = [
        "@maven//:com_github_seancfoley_ipaddress",
        "@maven//:com_google_guava_guava",
        "@maven//:com_google_protobuf_protobuf_java",
        "@maven//:jakarta_mail_jakarta_mail_api",
        "@maven//:org_projectnessie_cel_cel_core",
    ],
)

alias(
    name = "build_buf_protovalidate_0_1_9",
    actual = "build_buf_protovalidate",
    visibility = ["//visibility:public"],
)

genrule(
    name = "build_buf_protovalidate_0_1_9_extension",
    srcs = ["@build_buf_protovalidate_0_1_9//file"],
    outs = ["build/buf/protovalidate/0.1.9/protovalidate-0.1.9.jar"],
    cmd = "cp $< $@",
    visibility = ["@@//visibility:private"],
)

It means you have to declare all of the protovalidate dependencies in your maven_install rule so you can refer to them as deps, but it should let you use the protovalidate jar.

from rules_jvm_external.

cheister avatar cheister commented on June 26, 2024

Actually, after looking at it, I think we can fix this just by changing the downloaded_file_path used with http_file when it has a build directory at the top-level #1037

from rules_jvm_external.

alex-shinn avatar alex-shinn commented on June 26, 2024

Thanks!

from rules_jvm_external.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.