Skip to content

Commit

Permalink
Hack java invocation to patch the java.xml.ws.annotation.
Browse files Browse the repository at this point in the history
Change-Id: I5e899cff0ed31e4128be5c7e949c99040a777a99
  • Loading branch information
hhclam committed Dec 6, 2017
1 parent bd4f2c0 commit 776d7b6
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ py_binary(
"//src/java_tools/buildjar/java/com/google/devtools/build/java/turbine:turbine_deploy.jar",
"//third_party/java/jacoco:srcs",
"//third_party/zlib:embedded_tools",
"//third_party/tomcat_annotations_api:embedded_tools",
] + select({
"//src/conditions:darwin": [
":darwin_tools",
Expand Down
6 changes: 3 additions & 3 deletions third_party/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -483,15 +483,15 @@ java_import(
],
)

java_import(
java_library(
name = "tomcat_annotations_api",
jars = ["tomcat_annotations_api/tomcat-annotations-api-8.0.5.jar"],
exports = ["//third_party/tomcat_annotations_api"],
)

# For bootstrapping JavaBuilder
filegroup(
name = "tomcat_annotations_api-jars",
srcs = ["tomcat_annotations_api/tomcat-annotations-api-8.0.5.jar"],
srcs = ["//third_party/tomcat_annotations_api:tomcat-annotations-api-8.0.5.jar"],
)

# Testing
Expand Down
18 changes: 18 additions & 0 deletions third_party/tomcat_annotations_api/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
licenses(["notice"]) # Apache 2.0

java_import(
name = "tomcat_annotations_api",
jars = ["tomcat-annotations-api-8.0.5.jar"],
visibility = ["//visibility:public"],
)

exports_files(
["tomcat-annotations-api-8.0.5.jar"],
visibility = ["//visibility:public"]
)

filegroup(
name = "embedded_tools",
srcs = glob(["*.jar"]) + ["BUILD"],
visibility = ["//visibility:public"],
)
11 changes: 11 additions & 0 deletions tools/jdk/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,22 @@ java_toolchain(
"--add-opens=java.base/java.nio=ALL-UNNAMED",
"-XX:+TieredCompilation",
"-XX:TieredStopAtLevel=1",
"--patch-module",
"java.xml.ws.annotation=$(location @bazel_tools//third_party/tomcat_annotations_api:tomcat-annotations-api-8.0.5.jar)",
"--add-modules",
"java.xml.ws.annotation"
],
misc = [
"-XDskipDuplicateBridges=true",
"-g",
"-parameters",
"--patch-module",
"java.xml.ws.annotation=$(location @bazel_tools//third_party/tomcat_annotations_api:tomcat-annotations-api-8.0.5.jar)",
"--add-modules",
"java.xml.ws.annotation"
],
tools = [
"@bazel_tools//third_party/tomcat_annotations_api:tomcat-annotations-api-8.0.5.jar",
],
singlejar = ["@bazel_tools//tools/jdk:singlejar"],
source_version = "9",
Expand Down

0 comments on commit 776d7b6

Please sign in to comment.