Skip to content

Commit 93a40ce

Browse files
authored
Update java example (#5701)
* use the loaded junit version * add comment
1 parent 38d9367 commit 93a40ce

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

examples/java/greetings_project/WORKSPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ load("@bazel_tools//tools/build_defs/repo:jvm.bzl", "jvm_maven_import_external")
22

33
jvm_maven_import_external(
44
name = "junit",
5-
artifact = "org.junit.jupiter:junit-jupiter-api:5.9.1",
6-
artifact_sha256 = "5d2fe4d719dffb25a95d77e9c7a34893cbbb1b4cc6c86f2726af7e0fb7035b2f",
5+
artifact = "junit:junit:4.13.2",
6+
artifact_sha256 = "8e495b634469d64fb8acfa3495a065cbacc8a0fff55ce1e31007be4c16dc57d3",
77
licenses = ["notice"], # Common Public License 1.0
88
server_urls = ["https://repo1.maven.org/maven2"],
99
)

examples/java/greetings_project/hello/hello.bazelproject

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@ additional_languages:
1818
# dart
1919
# kotlin
2020
# python
21-
# scala
21+
# scala
22+
23+
build_flags:
24+
# make sure the junit version loaded in the WORKSPACE is the one used
25+
--explicit_java_test_deps

0 commit comments

Comments
 (0)