From 9f0e9a2ed44f445b8dfce5345d057d0c6f3b702d Mon Sep 17 00:00:00 2001 From: Mai Essa Date: Fri, 10 Nov 2023 21:24:22 -0500 Subject: [PATCH 1/2] use the loaded junit version --- examples/java/greetings_project/WORKSPACE | 4 ++-- examples/java/greetings_project/hello/hello.bazelproject | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/java/greetings_project/WORKSPACE b/examples/java/greetings_project/WORKSPACE index 9bf46e030c1..2431ba32276 100644 --- a/examples/java/greetings_project/WORKSPACE +++ b/examples/java/greetings_project/WORKSPACE @@ -2,8 +2,8 @@ load("@bazel_tools//tools/build_defs/repo:jvm.bzl", "jvm_maven_import_external") jvm_maven_import_external( name = "junit", - artifact = "org.junit.jupiter:junit-jupiter-api:5.9.1", - artifact_sha256 = "5d2fe4d719dffb25a95d77e9c7a34893cbbb1b4cc6c86f2726af7e0fb7035b2f", + artifact = "junit:junit:4.13.2", + artifact_sha256 = "8e495b634469d64fb8acfa3495a065cbacc8a0fff55ce1e31007be4c16dc57d3", licenses = ["notice"], # Common Public License 1.0 server_urls = ["https://repo1.maven.org/maven2"], ) diff --git a/examples/java/greetings_project/hello/hello.bazelproject b/examples/java/greetings_project/hello/hello.bazelproject index e5adcfea838..2ed22b0ce46 100644 --- a/examples/java/greetings_project/hello/hello.bazelproject +++ b/examples/java/greetings_project/hello/hello.bazelproject @@ -18,4 +18,7 @@ additional_languages: # dart # kotlin # python - # scala \ No newline at end of file + # scala + +build_flags: + --explicit_java_test_deps \ No newline at end of file From cce5a4c6ccb44226576d098f96132ea3670704da Mon Sep 17 00:00:00 2001 From: Mai Essa Date: Fri, 10 Nov 2023 21:28:42 -0500 Subject: [PATCH 2/2] add comment --- examples/java/greetings_project/hello/hello.bazelproject | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/java/greetings_project/hello/hello.bazelproject b/examples/java/greetings_project/hello/hello.bazelproject index 2ed22b0ce46..16a82f816ca 100644 --- a/examples/java/greetings_project/hello/hello.bazelproject +++ b/examples/java/greetings_project/hello/hello.bazelproject @@ -21,4 +21,5 @@ additional_languages: # scala build_flags: + # make sure the junit version loaded in the WORKSPACE is the one used --explicit_java_test_deps \ No newline at end of file