Skip to content

Commit 7113a98

Browse files
committed
Change from native.maven_jar to jvm_maven_import_external
- Bazel 2 removed the support for maven_jar. Tested build with bazel 1.1.0 and 2.2.0 on OSX. With this change the 2.2.0 build no longer fails and 1.1.0 still seem to build without issues.
1 parent 0f932af commit 7113a98

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

internal/openapi_generator.bzl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
# Copyright 2019 OpenAPI-Generator-Bazel Contributors
22

3+
load("@bazel_tools//tools/build_defs/repo:jvm.bzl", "jvm_maven_import_external")
4+
35
def openapi_tools_generator_bazel_repositories(openapi_generator_cli_version = "4.1.3", sha256 = "234cbbc5ec9b56e4b585199ec387b5ad3aefb3eda9424c30d35c849dd5950d2f", prefix = "openapi_tools_generator_bazel"):
4-
native.maven_jar(
6+
jvm_maven_import_external(
57
name = "openapi_tools_generator_bazel_cli",
6-
sha256 = sha256,
8+
artifact_sha256 = sha256,
79
artifact = "org.openapitools:openapi-generator-cli:" + openapi_generator_cli_version,
10+
server_urls = [
11+
"https://jcenter.bintray.com/",
12+
"https://repo1.maven.org/maven2",
13+
],
814
)
915
native.bind(
1016
name = prefix + "/dependency/openapi-generator-cli",

0 commit comments

Comments
 (0)