@@ -2,7 +2,7 @@ workspace(name = "rules_jdt")
2
2
3
3
# --------------------------------------------------------------------------
4
4
# Load http_archive
5
- load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
5
+ load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" , "http_file" )
6
6
7
7
# Load Bazel Skylib
8
8
http_archive (
@@ -117,12 +117,25 @@ jvm_maven_import_external(
117
117
server_urls = _DEFAULT_REPOSITORIES ,
118
118
)
119
119
120
- jvm_maven_import_external (
121
- name = "rules_jdt_jacoco_core" ,
122
- artifact = "org.jacoco:org.jacoco.core:0.8.7" ,
123
- artifact_sha256 = "ad7739b5fb5969aa1a8aead3d74ed54dc82ed012f1f10f336bd1b96e71c1a13c" ,
124
- licenses = ["notice" ],
125
- server_urls = _DEFAULT_REPOSITORIES ,
120
+ # here we need to use the same jacoco version/jars that bazel adds to the runtime classpath
121
+ # if the jars are out of sync this error will be reported: NoClassDefFoundError: org/jacoco/agent/rt/internal_{commit-hash}/Offline
122
+ # get the latest bazel jacoco jars from https://github.com/bazelbuild/bazel/tree/master/third_party/java/jacoco
123
+ http_file (
124
+ name = "bazel_org_jacoco_core_jar" ,
125
+ downloaded_file_path = "org.jacoco.core-0.8.9-SNAPSHOT.jar" ,
126
+ urls = [
127
+ "https://github.com/bazelbuild/bazel/raw/master/third_party/java/jacoco/org.jacoco.core-0.8.9-SNAPSHOT.jar"
128
+ ],
129
+ sha256 = "434d2b652afbf48904172d3f078ed126220997f247d66d5ed93a8f5f107783b3" ,
130
+ )
131
+
132
+ http_file (
133
+ name = "bazel_org_jacoco_core_srcjar" ,
134
+ downloaded_file_path = "org.jacoco.core-0.8.9-SNAPSHOT-sources.jar" ,
135
+ urls = [
136
+ "https://github.com/bazelbuild/bazel/raw/master/third_party/java/jacoco/org.jacoco.core-0.8.9-SNAPSHOT-sources.jar"
137
+ ],
138
+ sha256 = "0d40cf9f67cc790727554d5474f8e2a9262aa2c99c6bada2defa97644eacf01d" ,
126
139
)
127
140
128
141
jvm_maven_import_external (
0 commit comments