Add //third_party/java/jaxb dependency to targets using javax.xml.bind

To make FOSS build compile, third_party vendoring rules for jaxb are added to package all jaxb related targets imported from maven into a uber jar, mirroring the same practice done in //third_party/java/jaxb

Cloned from CL 182666460 by 'g4 patch'.
Original change by cushon@cushon:rosie182283995-0071_Rosie:47348:citc on 2018/01/20 13:36:15.

More information:
https://docs.google.com/document/d/1htErgDIoHMEuMBfGwrtS_O4WwhTw8QOGLva-7aYYvYs/edit?usp=sharing
Tested:
    TAP --sample for global presubmit queue
    []    passed FOSS test

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182855173
This commit is contained in:
jianglai 2018-01-22 16:25:59 -08:00
parent b5fb62c984
commit 97e962ba0a
13 changed files with 51 additions and 0 deletions

View file

@ -16,6 +16,7 @@ java_library(
"//java/google/registry/config",
"//java/google/registry/util",
"//java/google/registry/xml",
"//third_party/jaxb",
"//third_party/objectify:objectify-v4_1",
"@com_google_appengine_api_1_0_sdk",
"@com_google_auto_value",

View file

@ -21,6 +21,7 @@ java_library(
"//java/google/registry/util",
"//java/google/registry/xjc",
"//java/google/registry/xml",
"//third_party/jaxb",
"//third_party/jsch/v0_1_53",
"//third_party/objectify:objectify-v4_1",
"@com_google_appengine_api_1_0_sdk",

View file

@ -20,6 +20,7 @@ java_library(
"//java/google/registry/util",
"//java/google/registry/xjc",
"//java/google/registry/xml",
"//third_party/jaxb",
"//third_party/objectify:objectify-v4_1",
"@com_google_appengine_api_1_0_sdk",
"@com_google_appengine_tools_appengine_gcs_client",

View file

@ -95,6 +95,7 @@ def domain_registry_repositories(
omit_com_squareup_javawriter=False,
omit_com_sun_xml_bind_jaxb_core=False,
omit_com_sun_xml_bind_jaxb_impl=False,
omit_com_sun_xml_bind_jaxb_jxc=False,
omit_com_sun_xml_bind_jaxb_xjc=False,
omit_com_thoughtworks_paranamer=False,
omit_commons_codec=False,
@ -303,6 +304,8 @@ def domain_registry_repositories(
com_sun_xml_bind_jaxb_impl()
if not omit_com_sun_xml_bind_jaxb_xjc:
com_sun_xml_bind_jaxb_xjc()
if not omit_com_sun_xml_bind_jaxb_jxc:
com_sun_xml_bind_jaxb_jxc()
if not omit_com_thoughtworks_paranamer:
com_thoughtworks_paranamer()
if not omit_commons_codec:
@ -1617,6 +1620,17 @@ def com_sun_xml_bind_jaxb_impl():
licenses = ["reciprocal"], # CDDL 1.1 or GPLv2 (We choo-choo-choose the CDDL)
)
def com_sun_xml_bind_jaxb_jxc():
java_import_external(
name = "com_sun_xml_bind_jaxb_jxc",
licenses = ["restricted"], # CDDL+GPL License
jar_sha256 = "25cbca594ec0682a1d0287c4a2fcb5f6a2a9718229d54a0ad09daf5cff180b4e",
jar_urls = [
"http://repo1.maven.org/maven2/com/sun/xml/bind/jaxb-jxc/2.2.11/jaxb-jxc-2.2.11.jar",
"http://maven.ibiblio.org/maven2/com/sun/xml/bind/jaxb-jxc/2.2.11/jaxb-jxc-2.2.11.jar",
],
)
def com_sun_xml_bind_jaxb_xjc():
java_import_external(
name = "com_sun_xml_bind_jaxb_xjc",

View file

@ -66,6 +66,7 @@ java_library(
"//java/google/registry/whois",
"//java/google/registry/xjc",
"//java/google/registry/xml",
"//third_party/jaxb",
"//third_party/objectify:objectify-v4_1",
"@com_beust_jcommander",
"@com_google_api_client",

View file

@ -8,6 +8,7 @@ java_library(
name = "util",
srcs = glob(["*.java"]),
deps = [
"//third_party/jaxb",
"//third_party/objectify:objectify-v4_1",
"@com_google_appengine_api_1_0_sdk",
"@com_google_code_findbugs_jsr305",

View file

@ -12,6 +12,7 @@ java_library(
visibility = ["//visibility:public"],
deps = [
"//java/google/registry/xml",
"//third_party/jaxb",
"@com_google_code_findbugs_jsr305",
"@com_google_guava",
"@joda_time",

View file

@ -14,6 +14,7 @@ java_library(
srcs = glob(["*.java"]),
resources = [":xml_schema_files"],
deps = [
"//third_party/jaxb",
"@com_google_code_findbugs_jsr305",
"@com_google_guava",
"@com_google_re2j",

View file

@ -27,6 +27,7 @@ java_library(
"//javatests/google/registry/testing/mapreduce",
"//javatests/google/registry/testing/sftp",
"//javatests/google/registry/xml",
"//third_party/jaxb",
"//third_party/jsch/v0_1_53",
"//third_party/objectify:objectify-v4_1",
"@com_google_appengine_api_1_0_sdk//:testonly",

View file

@ -22,6 +22,7 @@ java_library(
"//java/google/registry/xjc",
"//javatests/google/registry/testing",
"//javatests/google/registry/testing/mapreduce",
"//third_party/jaxb",
"//third_party/objectify:objectify-v4_1",
"@com_google_appengine_api_1_0_sdk//:testonly",
"@com_google_appengine_tools_appengine_gcs_client",

View file

@ -36,6 +36,7 @@ java_library(
"//javatests/google/registry/testing",
"//javatests/google/registry/tools/server",
"//javatests/google/registry/xml",
"//third_party/jaxb",
"//third_party/objectify:objectify-v4_1",
"@com_beust_jcommander",
"@com_google_api_client",

8
third_party/jaxb/BUILD vendored Normal file
View file

@ -0,0 +1,8 @@
package(default_visibility = ["//visibility:public"])
licenses(["reciprocal"]) # CDDL 1.1 (also dual-licensed under GPL v2)
java_library(
name = "jaxb",
exports = ["//third_party/jaxb/v2_2_11"],
)

19
third_party/jaxb/v2_2_11/BUILD vendored Normal file
View file

@ -0,0 +1,19 @@
package_group(
name = "specific_version",
packages = ["//third_party/jaxb"],
)
package(default_visibility = ["//visibility:public"])
licenses(["reciprocal"]) # CDDL 1.1 (also dual-licensed under GPL v2)
java_library(
name = "v2_2_11",
exports = [
"@com_sun_xml_bind_jaxb_core",
"@com_sun_xml_bind_jaxb_impl",
"@com_sun_xml_bind_jaxb_jxc",
"@com_sun_xml_bind_jaxb_xjc",
"@javax_xml_bind_jaxb_api",
],
)