From 3d7937f026081426e997cd0287f92ebca7570294 Mon Sep 17 00:00:00 2001 From: Alexei Barantsev Date: Thu, 22 Nov 2018 00:39:44 +0300 Subject: [PATCH] [java] Building test drivers with bazel --- .../src/org/openqa/selenium/os/BUILD.bazel | 1 + .../org/openqa/selenium/support/BUILD.bazel | 52 ++++++++++++++ .../selenium/support/events/BUILD.bazel | 10 +++ .../openqa/selenium/support/ui/BUILD.bazel | 63 +++++++++++++++++ .../test/org/openqa/selenium/BUILD.bazel | 53 +++++++++++++++ .../openqa/selenium/environment/BUILD.bazel | 19 ++++++ .../org/openqa/selenium/testing/BUILD.bazel | 66 ++++++++++++++++++ .../selenium/testing/drivers/BUILD.bazel | 68 +++++++++++++++++++ third_party/java/commons-codec/BUILD.bazel | 17 +++++ third_party/java/commons-io/BUILD.bazel | 17 +++++ third_party/java/commons-logging/BUILD.bazel | 18 +++++ third_party/java/commons-net/BUILD.bazel | 17 +++++ third_party/java/commons/BUILD.bazel | 53 ++++++++++++--- third_party/java/github/BUILD.bazel | 18 +++++ third_party/java/gson/BUILD.bazel | 18 +++++ third_party/java/htmlunit/BUILD.bazel | 68 +++++++++++++++++++ third_party/java/httpcomponents/BUILD.bazel | 52 ++++++++++++++ third_party/java/jetty/BUILD.bazel | 9 +-- third_party/java/selenium/BUILD.bazel | 21 ++++++ third_party/java/servlet/BUILD.bazel | 1 + third_party/java/websocket/BUILD.bazel | 56 +++++++++++++++ third_party/java/xalan/BUILD.bazel | 38 +++++++++++ third_party/java/xerces/BUILD.bazel | 19 ++++++ third_party/java/xml-apis/BUILD.bazel | 18 +++++ 24 files changed, 757 insertions(+), 15 deletions(-) create mode 100644 java/client/src/org/openqa/selenium/support/BUILD.bazel create mode 100644 java/client/src/org/openqa/selenium/support/events/BUILD.bazel create mode 100644 java/client/src/org/openqa/selenium/support/ui/BUILD.bazel create mode 100644 java/client/test/org/openqa/selenium/BUILD.bazel create mode 100644 java/client/test/org/openqa/selenium/environment/BUILD.bazel create mode 100644 java/client/test/org/openqa/selenium/testing/BUILD.bazel create mode 100644 java/client/test/org/openqa/selenium/testing/drivers/BUILD.bazel create mode 100644 third_party/java/commons-codec/BUILD.bazel create mode 100644 third_party/java/commons-io/BUILD.bazel create mode 100644 third_party/java/commons-logging/BUILD.bazel create mode 100644 third_party/java/commons-net/BUILD.bazel create mode 100644 third_party/java/github/BUILD.bazel create mode 100644 third_party/java/gson/BUILD.bazel create mode 100644 third_party/java/htmlunit/BUILD.bazel create mode 100644 third_party/java/httpcomponents/BUILD.bazel create mode 100644 third_party/java/selenium/BUILD.bazel create mode 100644 third_party/java/websocket/BUILD.bazel create mode 100644 third_party/java/xalan/BUILD.bazel create mode 100644 third_party/java/xerces/BUILD.bazel create mode 100644 third_party/java/xml-apis/BUILD.bazel diff --git a/java/client/src/org/openqa/selenium/os/BUILD.bazel b/java/client/src/org/openqa/selenium/os/BUILD.bazel index 79370aba5927c..da52edda38f69 100644 --- a/java/client/src/org/openqa/selenium/os/BUILD.bazel +++ b/java/client/src/org/openqa/selenium/os/BUILD.bazel @@ -9,5 +9,6 @@ java_library( ], visibility = [ "//java/client/src/org/openqa/selenium/remote:__pkg__", + "//java/client/test:__subpackages__", ], ) diff --git a/java/client/src/org/openqa/selenium/support/BUILD.bazel b/java/client/src/org/openqa/selenium/support/BUILD.bazel new file mode 100644 index 0000000000000..26596036b1ab7 --- /dev/null +++ b/java/client/src/org/openqa/selenium/support/BUILD.bazel @@ -0,0 +1,52 @@ +load("//java:version.bzl", "SE_VERSION") + +java_library( + name = "support", + tags = [ + "maven_coordinates=org.seleniumhq.selenium:selenium-support:" + SE_VERSION, + ], + srcs = [ + "Color.java", + "Colors.java", + "ThreadGuard.java", + ], + deps = [ + ":page-factory", + "//java/client/src/org/openqa/selenium/support/events:events", + "//java/client/src/org/openqa/selenium/support/ui:clock", + "//java/client/src/org/openqa/selenium/support/ui:components", + "//java/client/src/org/openqa/selenium/support/ui:elements", + "//java/client/src/org/openqa/selenium/support/ui:wait", + "//java/client/src/org/openqa/selenium:selenium", + ], + visibility = [ + "//visibility:public", + ], +) + +java_library( + name = "page-factory", + srcs = [ + "AbstractFindByBuilder.java", + "ByIdOrName.java", + "CacheLookup.java", + "FindAll.java", + "FindBy.java", + "FindBys.java", + "How.java", + "PageFactory.java", + "PageFactoryFinder.java", + ] + glob([ + "pagefactory/*.java", + "pagefactory/internal/*.java", + ]), + deps = [ + "//java/client/src/org/openqa/selenium:selenium", + "//java/client/src/org/openqa/selenium/support/ui:clock", + "//java/client/src/org/openqa/selenium/support/ui:components", + "//third_party/java/guava:guava", + ], + visibility = [ + "//visibility:public", + ], +) diff --git a/java/client/src/org/openqa/selenium/support/events/BUILD.bazel b/java/client/src/org/openqa/selenium/support/events/BUILD.bazel new file mode 100644 index 0000000000000..f7defea4c399c --- /dev/null +++ b/java/client/src/org/openqa/selenium/support/events/BUILD.bazel @@ -0,0 +1,10 @@ +java_library( + name = "events", + srcs = glob(["**/*.java"]), + deps = [ + "//java/client/src/org/openqa/selenium:selenium", + ], + visibility = [ + "//visibility:public", + ], +) diff --git a/java/client/src/org/openqa/selenium/support/ui/BUILD.bazel b/java/client/src/org/openqa/selenium/support/ui/BUILD.bazel new file mode 100644 index 0000000000000..ca3d857069bab --- /dev/null +++ b/java/client/src/org/openqa/selenium/support/ui/BUILD.bazel @@ -0,0 +1,63 @@ +java_library( + name = "clock", + srcs = [ + "Sleeper.java", + ], + deps = [ + "//third_party/java/guava:guava", + ], + visibility = [ + "//visibility:public", + ], +) + +java_library( + name = "components", + srcs = [ + "LoadableComponent.java", + "SlowLoadableComponent.java", + ], + deps = [ + ":clock", + "//java/client/src/org/openqa/selenium:selenium", + ], + visibility = [ + "//visibility:public", + ], +) + +java_library( + name = "elements", + srcs = [ + "Quotes.java", + "ISelect.java", + "Select.java", + "UnexpectedTagNameException.java", + ], + deps = [ + "//java/client/src/org/openqa/selenium:selenium", + ], + visibility = [ + "//visibility:public", + ], +) + +java_library( + name = "wait", + srcs = [ + "ExpectedCondition.java", + "ExpectedConditions.java", + "FluentWait.java", + "Wait.java", + "WebDriverWait.java", + ], + deps = [ + ":clock", + "//java/client/src/org/openqa/selenium:selenium", + "//java/client/src/org/openqa/selenium/remote:remote", + "//third_party/java/guava:guava", + ], + visibility = [ + "//visibility:public", + ], +) diff --git a/java/client/test/org/openqa/selenium/BUILD.bazel b/java/client/test/org/openqa/selenium/BUILD.bazel new file mode 100644 index 0000000000000..a162c8311b3d3 --- /dev/null +++ b/java/client/test/org/openqa/selenium/BUILD.bazel @@ -0,0 +1,53 @@ +load("//java:bazel-rules.bzl", "gen_java_tests") + +SMALL_TESTS = [ + "ArchitectureTest.java", + "ByTest.java", + "CookieTest.java", + "DimensionTest.java", + "ImmutableCapabilitiesTest.java", + "KeysTest.java", + "OutputTypeTest.java", + "PlatformTest.java", + "PointTest.java", + # "ProxyTest.java", # needs more dependencies +] + +gen_java_tests( + srcs = SMALL_TESTS, + size = "small", + deps = [ + "//java/client/src/org/openqa/selenium:selenium", + "//third_party/java/assertj:assertj", + "//third_party/java/guava:guava", + "//third_party/java/junit:junit", + "//third_party/java/mockito:mockito-core", + ], +) + +java_library( + name = "helpers", + srcs = [ + "BuckBuild.java", + "Build.java", + "Pages.java", + "ParallelTestRunner.java", + "StubDriver.java", + "WaitingConditions.java", + "WrappedWebElement.java", + ], + deps = [ + "//java/client/src/org/openqa/selenium:selenium", + "//java/client/src/org/openqa/selenium/os:os", + "//java/client/src/org/openqa/selenium/support/ui:wait", + "//java/client/test/org/openqa/selenium/environment:environment", + "//java/client/test/org/openqa/selenium/testing:helpers", + "//third_party/java/guava:guava", + "//third_party/java/junit:junit", + ], + visibility = [ + "//java/client/test:__subpackages__", + "//java/server/test:__subpackages__", + ], +) + diff --git a/java/client/test/org/openqa/selenium/environment/BUILD.bazel b/java/client/test/org/openqa/selenium/environment/BUILD.bazel new file mode 100644 index 0000000000000..2b75e9571d91d --- /dev/null +++ b/java/client/test/org/openqa/selenium/environment/BUILD.bazel @@ -0,0 +1,19 @@ +java_library( + name = "environment", + srcs = glob([ + "*.java", + "webserver/*.java" + ], exclude = ["**/*Test.java", "**/*TestBase.java"]), + deps = [ + "//java/client/src/org/openqa/selenium:selenium", + "//java/client/src/org/openqa/selenium/remote:remote", + "//java/client/test/org/openqa/selenium/testing:helpers", + "//third_party/java/guava:guava", + "//third_party/java/jetty:jetty", + "//third_party/java/servlet:javax.servlet-api", + ], + visibility = [ + "//java/client/test:__subpackages__", + "//java/server/test:__subpackages__", + ], +) diff --git a/java/client/test/org/openqa/selenium/testing/BUILD.bazel b/java/client/test/org/openqa/selenium/testing/BUILD.bazel new file mode 100644 index 0000000000000..86376ee5c2717 --- /dev/null +++ b/java/client/test/org/openqa/selenium/testing/BUILD.bazel @@ -0,0 +1,66 @@ +java_library( + name = "annotations", + srcs = [ + "Driver.java", + "Ignore.java", + "IgnoreList.java", + "NeedsLocalEnvironment.java", + "NeedsFreshDriver.java", + "NoDriverAfterTest.java", + "NoDriverBeforeTest.java", + "NotYetImplemented.java", + "NotYetImplementedList.java", + "SwitchToTopAfterTest.java", + ], + deps = [ + "//java/client/src/org/openqa/selenium:selenium", + ], + visibility = [ + "//java/client/test:__subpackages__", + ], +) + +java_library( + name = "helpers", + srcs = [ + "DevMode.java", + "InProject.java", + ], + deps = [ + "//java/client/src/org/openqa/selenium:selenium", + "//third_party/java/guava:guava", + ], + visibility = [ + "//java/client/test:__subpackages__", + "//java/server/test:__subpackages__", + ], +) + +#java_library( +# name = "test-base", +# srcs = [ +# "JUnit4TestBase.java", +# "SeleniumTestRunner.java", +# "StaticResources.java", +# "TestUtilities.java", +# ], +# deps = [ +# ":annotations", +# ":helpers", +# "//java/client/test/org/openqa/selenium:helpers", +# "//java/client/test/org/openqa/selenium/environment:environment", +# "//java/client/test/org/openqa/selenium/testing/drivers:browser", +# "//java/client/src/org/openqa/selenium:selenium", +# "//java/client/src/org/openqa/selenium/remote:remote", +# "//java/client/src/org/openqa/selenium/support/ui:wait", +# "//java/client/test/org/openqa/selenium/testing/drivers:drivers", +# "//third_party/java/guava:guava", +# "//third_party/java/assertj:assertj", +# "//third_party/java/junit:junit", +# "//third_party/java/selenium:htmlunit-driver", +# ], +# visibility = [ +# "//java/client/test:__subpackages__", +# "//java/server/test:__subpackages__", +# ], +#) diff --git a/java/client/test/org/openqa/selenium/testing/drivers/BUILD.bazel b/java/client/test/org/openqa/selenium/testing/drivers/BUILD.bazel new file mode 100644 index 0000000000000..07a6ba719ae20 --- /dev/null +++ b/java/client/test/org/openqa/selenium/testing/drivers/BUILD.bazel @@ -0,0 +1,68 @@ +java_library(name = "browser", + srcs = [ + "Browser.java", + ], + visibility = [ + "//java/client/test:__subpackages__", + "//java/server/test:__subpackages__", + ], +) + +java_library( + name = "drivers", + srcs = glob([ + "*Driver.java", + "*Supplier.java", + ]) + [ + "IgnoreComparator.java", + "OutOfProcessSeleniumServer.java", + "TestIgnorance.java", + "WebDriverBuilder.java", + ], + deps = [ + ":browser", + "//java/client/src/org/openqa/selenium:selenium", + "//java/client/src/org/openqa/selenium/chrome:chrome", + "//java/client/src/org/openqa/selenium/firefox:firefox", + "//java/client/src/org/openqa/selenium/ie:ie", + "//java/client/src/org/openqa/selenium/opera:opera", + "//java/client/src/org/openqa/selenium/safari:safari", + "//java/client/src/org/openqa/selenium/remote:remote", + "//java/client/src/org/openqa/selenium/support:support", + "//java/client/src/org/openqa/selenium/support/ui:wait", + "//java/client/test/org/openqa/selenium:helpers", + "//java/client/test/org/openqa/selenium/testing:annotations", + "//java/client/test/org/openqa/selenium/testing:helpers", + # "//java/server/src/org/openqa/grid/selenium:selenium", + "//third_party/java/github:org.eclipse.egit.github.core", + "//third_party/java/guava:guava", + "//third_party/java/selenium:htmlunit-driver", + "//third_party/java/junit:junit", + ], + visibility = [ + "//java/client/test:__subpackages__", + "//java/server/test:__subpackages__", + ], +) + +#export_file(name = 'firebug', +# src = '//third_party/firebug:firebug', +# out = 'firebug-1.5.0-fx.xpi', +#) +# +#java_library(name = 'small-tests', +# srcs = [ +# 'IgnoreComparatorUnitTest.java', +# ], +# deps = [ +# ':drivers', +# '//java/client/src/org/openqa/selenium:selenium', +# '//java/client/test/org/openqa/selenium/testing:annotations', +# '//third_party/java/guava:guava', +# '//third_party/java/junit:junit', +# '//third_party/java/mockito:mockito-core', +# ], +# visibility = [ +# '//java/client/test/org/openqa/selenium:small-tests', +# ] +#) diff --git a/third_party/java/commons-codec/BUILD.bazel b/third_party/java/commons-codec/BUILD.bazel new file mode 100644 index 0000000000000..781350802bfb6 --- /dev/null +++ b/third_party/java/commons-codec/BUILD.bazel @@ -0,0 +1,17 @@ + +java_import( + name = "commons-codec", + tags = [ + "maven_coordinates=commons-codec:commons-codec:jar:1.10", + ], + licenses = [ + "notice", # Apache 2 + ], + jars = ["commons-codec-1.10.jar"], + srcjar = "commons-codec-1.10-sources.jar", + deps = [ + ], + visibility = [ + "//third_party/java/httpcomponents:__pkg__", + ], +) diff --git a/third_party/java/commons-io/BUILD.bazel b/third_party/java/commons-io/BUILD.bazel new file mode 100644 index 0000000000000..eebdc44ff2838 --- /dev/null +++ b/third_party/java/commons-io/BUILD.bazel @@ -0,0 +1,17 @@ + +java_import( + name = "commons-io", + tags = [ + "maven_coordinates=commons-io:commons-io:jar:2.6", + ], + licenses = [ + "notice", # Apache 2 + ], + jars = ["commons-io-2.6.jar"], + srcjar = "commons-io-2.6-sources.jar", + deps = [ + ], + visibility = [ + "//third_party/java/htmlunit:__pkg__", + ], +) diff --git a/third_party/java/commons-logging/BUILD.bazel b/third_party/java/commons-logging/BUILD.bazel new file mode 100644 index 0000000000000..6c2b26c73fe97 --- /dev/null +++ b/third_party/java/commons-logging/BUILD.bazel @@ -0,0 +1,18 @@ + +java_import( + name = "commons-logging", + tags = [ + "maven_coordinates=commons-logging:commons-logging:jar:1.2", + ], + licenses = [ + "notice", # Apache 2 + ], + jars = ["commons-logging-1.2.jar"], + srcjar = "commons-logging-1.2-sources.jar", + deps = [ + ], + visibility = [ + "//third_party/java/htmlunit:__pkg__", + "//third_party/java/httpcomponents:__pkg__", + ], +) \ No newline at end of file diff --git a/third_party/java/commons-net/BUILD.bazel b/third_party/java/commons-net/BUILD.bazel new file mode 100644 index 0000000000000..0acbf7121d745 --- /dev/null +++ b/third_party/java/commons-net/BUILD.bazel @@ -0,0 +1,17 @@ + +java_import( + name = "commons-net", + tags = [ + "maven_coordinates=commons-net:commons-net:jar:3.6", + ], + licenses = [ + "notice", # Apache 2 + ], + jars = ["commons-net-3.6.jar"], + srcjar = "commons-net-3.6-sources.jar", + deps = [ + ], + visibility = [ + "//third_party/java/htmlunit:__pkg__", + ], +) diff --git a/third_party/java/commons/BUILD.bazel b/third_party/java/commons/BUILD.bazel index ae9078996a128..9e9b1c9018bb4 100644 --- a/third_party/java/commons/BUILD.bazel +++ b/third_party/java/commons/BUILD.bazel @@ -1,13 +1,44 @@ java_import( - name = 'commons-exec', - licenses = [ - "notice", # Apache 2 - ], - jars = [ - 'commons-exec-1.3.jar', - ], - srcjar = 'commons-exec-1.3-sources.jar', - visibility = [ - '//java/client/src/org/openqa/selenium/os:__pkg__', - ], + name = "commons-exec", + tags = [ + "maven_coordinates=org.apache.commons:commons-exec:jar:1.3", + ], + licenses = [ + "notice", # Apache 2 + ], + jars = ['commons-exec-1.3.jar'], + srcjar = 'commons-exec-1.3-sources.jar', + visibility = [ + "//java/client/src/org/openqa/selenium/os:__pkg__", + ], +) + +java_import( + name = "commons-lang3", + tags = [ + "maven_coordinates=org.apache.commons:commons-lang3:jar:3.7", + ], + licenses = [ + "notice", # Apache 2 + ], + jars = ["commons-lang3-3.7.jar"], + srcjar = "commons-lang3-3.7-sources.jar", + visibility = [ + "//third_party/java/htmlunit:__pkg__" + ], +) + +java_import( + name = "commons-text", + tags = [ + "maven_coordinates=org.apache.commons:commons-text:jar:1.1", + ], + licenses = [ + "notice", # Apache 2 + ], + jars = ["commons-text-1.1.jar"], + srcjar = "commons-text-1.1-sources.jar", + visibility = [ + "//third_party/java/htmlunit:__pkg__" + ], ) diff --git a/third_party/java/github/BUILD.bazel b/third_party/java/github/BUILD.bazel new file mode 100644 index 0000000000000..f6591b8b5ee88 --- /dev/null +++ b/third_party/java/github/BUILD.bazel @@ -0,0 +1,18 @@ +java_import( + name = "org.eclipse.egit.github.core", + tags = [ + "maven_coordinates=org.eclipse.mylyn.github:org.eclipse.egit.github.core:jar:2.1.5", + ], + licenses = [ + "reciprocal", # EPL + ], + jars = ["org.eclipse.egit.github.core-2.1.5.jar"], + srcjar = "org.eclipse.egit.github.core-2.1.5.jar", + deps = [ + "//third_party/java/gson:gson", + ], + visibility = [ + "//java/client/test:__subpackages__", + "//java/server/test:__subpackages__", + ], +) diff --git a/third_party/java/gson/BUILD.bazel b/third_party/java/gson/BUILD.bazel new file mode 100644 index 0000000000000..7a50690605efc --- /dev/null +++ b/third_party/java/gson/BUILD.bazel @@ -0,0 +1,18 @@ +java_import( + name = "gson", + tags = [ + "maven_coordinates=com.google.code.gson:gson:jar:2.8.4", + ], + licenses = [ + "notice", # Apache 2 + ], + jars = ["gson-2.8.4.jar"], + srcjar = "gson-2.8.4-sources.jar", + deps = [ + ], + visibility = [ + "//java/client/test:__subpackages__", + "//java/server/test:__subpackages__", + "//third_party/java/github:__pkg__", + ], +) diff --git a/third_party/java/htmlunit/BUILD.bazel b/third_party/java/htmlunit/BUILD.bazel new file mode 100644 index 0000000000000..cefeb86905059 --- /dev/null +++ b/third_party/java/htmlunit/BUILD.bazel @@ -0,0 +1,68 @@ +java_import( + name = "htmlunit", + tags = [ + "maven_coordinates=net.sourceforge.htmlunit:htmlunit:jar:2.33", + ], + licenses = [ + "notice", # Apache 2 + ], + jars = ["htmlunit-2.33.jar"], + srcjar = "htmlunit-2.33-sources.jar", + deps = [ + ":htmlunit-core-js", + ":neko-htmlunit", + ":htmlunit-cssparser", + "//third_party/java/commons:commons-lang3", + "//third_party/java/commons:commons-text", + "//third_party/java/commons-io:commons-io", + "//third_party/java/commons-logging:commons-logging", + "//third_party/java/commons-net:commons-net", + "//third_party/java/httpcomponents:httpmime", + "//third_party/java/websocket:websocket-client", + "//third_party/java/xalan:xalan" + ], + visibility = [ + "//java/client/test:__subpackages__", + "//java/server/test:__subpackages__", + "//third_party/java/selenium:__pkg__", + ], +) + +java_import( + name = "htmlunit-core-js", + tags = [ + "maven_coordinates=net.sourceforge.htmlunit:htmlunit-core-js:jar:2.33", + ], + licenses = [ + "notice", # Apache 2 + ], + jars = ["htmlunit-core-js-2.33.jar"], + srcjar = "htmlunit-core-js-2.33-sources.jar", +) + +java_import( + name = "neko-htmlunit", + tags = [ + "maven_coordinates=net.sourceforge.htmlunit:neko-htmlunit:jar:2.33", + ], + licenses = [ + "notice", # Apache 2 + ], + jars = ["neko-htmlunit-2.33.jar"], + srcjar = "neko-htmlunit-2.33-sources.jar", + deps = [ + "//third_party/java/xerces:xercesImpl" + ], +) + +java_import( + name = "htmlunit-cssparser", + tags = [ + "maven_coordinates=net.sourceforge.htmlunit:htmlunit-cssparser:jar:1.2.0", + ], + licenses = [ + "notice", # Apache 2 + ], + jars = ["htmlunit-cssparser-1.2.0.jar"], + srcjar = "htmlunit-cssparser-1.2.0-sources.jar", +) diff --git a/third_party/java/httpcomponents/BUILD.bazel b/third_party/java/httpcomponents/BUILD.bazel new file mode 100644 index 0000000000000..bee545c68c00c --- /dev/null +++ b/third_party/java/httpcomponents/BUILD.bazel @@ -0,0 +1,52 @@ +java_import( + name = "httpclient", + tags = [ + "maven_coordinates=org.apache.httpcomponents:httpclient:jar:4.5.5", + ], + licenses = [ + "notice", # Apache 2 + ], + jars = ["httpclient-4.5.5.jar"], + srcjar = "httpclient-4.5.5-sources.jar", + deps = [ + ":httpcore", + "//third_party/java/commons-codec:commons-codec", + "//third_party/java/commons-logging:commons-logging", + ], + visibility = [ + ], +) + +java_import( + name = "httpcore", + tags = [ + "maven_coordinates=org.apache.httpcomponents:httpcore:jar:4.4.9", + ], + licenses = [ + "notice", # Apache 2 + ], + jars = ["httpcore-4.4.9.jar"], + srcjar = "httpcore-4.4.9-sources.jar", + deps = [ + ], + visibility = [ + ], +) + +java_import( + name = "httpmime", + tags = [ + "maven_coordinates=org.apache.httpcomponents:httpmime:jar:4.5.5", + ], + licenses = [ + "notice", # Apache 2 + ], + jars = ["httpmime-4.5.5.jar"], + srcjar = "httpmime-4.5.5-sources.jar", + deps = [ + ":httpclient", + ], + visibility = [ + "//third_party/java/htmlunit:__pkg__", + ], +) diff --git a/third_party/java/jetty/BUILD.bazel b/third_party/java/jetty/BUILD.bazel index 113639bf7ca10..b6ab8f4294db1 100644 --- a/third_party/java/jetty/BUILD.bazel +++ b/third_party/java/jetty/BUILD.bazel @@ -24,6 +24,7 @@ java_library( ":jetty-xml-repacked", ], visibility = [ + "//java/client/test/org/openqa/selenium/environment:__pkg__", "//java/server/src/org/openqa:__subpackages__", ], ) @@ -75,7 +76,7 @@ java_import( ":jetty-io", ], visibility = [ - # "//third_party/java/websocket:", + "//third_party/java/websocket:__pkg__", ], ) @@ -105,7 +106,7 @@ java_import( ":jetty-util", ], visibility = [ - # "//third_party/java/websocket:", + "//third_party/java/websocket:__pkg__", ], ) @@ -177,7 +178,7 @@ java_import( "//third_party/java/servlet:javax.servlet-api", ], visibility = [ - # "//third_party/java/websocket:", + "//third_party/java/websocket:__pkg__", ], ) @@ -193,6 +194,6 @@ java_import( ":jetty-util", ], visibility = [ - # "//third_party/java/websocket:", + "//third_party/java/websocket:__pkg__", ], ) diff --git a/third_party/java/selenium/BUILD.bazel b/third_party/java/selenium/BUILD.bazel new file mode 100644 index 0000000000000..61870788a859a --- /dev/null +++ b/third_party/java/selenium/BUILD.bazel @@ -0,0 +1,21 @@ +java_import( + name = "htmlunit-driver", + tags = [ + "maven_coordinates=org.seleniumhq.selenium:htmlunit-driver:jar:2.32.2-SNAPSHOT", + ], + licenses = [ + "notice", # Apache 2 + + ], + jars = ["htmlunit-driver-2.32.2-SNAPSHOT.jar"], + srcjar = "htmlunit-driver-2.32.2-SNAPSHOT-sources.jar", + deps = [ + "//java/client/src/org/openqa/selenium/remote:remote", + "//java/client/src/org/openqa/selenium/support:support", + "//third_party/java/htmlunit:htmlunit", + ], + visibility = [ + "//java/client/test:__subpackages__", + "//java/server/test:__subpackages__", + ], +) diff --git a/third_party/java/servlet/BUILD.bazel b/third_party/java/servlet/BUILD.bazel index 354c20e69b647..7b7b12ed02c72 100644 --- a/third_party/java/servlet/BUILD.bazel +++ b/third_party/java/servlet/BUILD.bazel @@ -11,6 +11,7 @@ java_import( jars = ["javax.servlet-api-3.1.0.jar"], srcjar = "javax.servlet-api-3.1.0-sources.jar", visibility = [ + "//java/client/test/org/openqa/selenium/environment:__pkg__", "//java/server/src/org/openqa:__subpackages__", "//third_party/java/jetty:__pkg__", ], diff --git a/third_party/java/websocket/BUILD.bazel b/third_party/java/websocket/BUILD.bazel new file mode 100644 index 0000000000000..6b98eca9f12fd --- /dev/null +++ b/third_party/java/websocket/BUILD.bazel @@ -0,0 +1,56 @@ +java_import( + name = "websocket-api", + tags = [ + "maven_coordinates=org.eclipse.jetty.websocket:websocket-api:jar:9.4.8.v20180619", + ], + licenses = [ + "reciprocal", # EPL + ], + jars = ["websocket-api-9.4.8.v20180619.jar"], + srcjar = "websocket-api-9.4.8.v20180619-sources.jar", + deps = [ + ], + visibility = [ + ], +) + +java_import( + name = "websocket-client", + tags = [ + "maven_coordinates=org.eclipse.jetty.websocket:websocket-client:jar:9.4.8.v20180619", + ], + licenses = [ + "reciprocal", # EPL + ], + jars = ["websocket-client-9.4.8.v20180619.jar"], + srcjar = "websocket-client-9.4.8.v20180619-sources.jar", + deps = [ + ":websocket-common", + "//third_party/java/jetty:jetty-client", + "//third_party/java/jetty:jetty-io", + "//third_party/java/jetty:jetty-util", + "//third_party/java/jetty:jetty-xml" + ], + visibility = [ + "//third_party/java/htmlunit:__pkg__", + ], +) + +java_import( + name = "websocket-common", + tags = [ + "maven_coordinates=org.eclipse.jetty.websocket:websocket-common:jar:9.4.8.v20180619", + ], + licenses = [ + "reciprocal", # EPL + ], + jars = ["websocket-common-9.4.8.v20180619.jar"], + srcjar = "websocket-common-9.4.8.v20180619-sources.jar", + deps = [ + ":websocket-api", + "//third_party/java/jetty:jetty-io", + "//third_party/java/jetty:jetty-util", + ], + visibility = [ + ], +) diff --git a/third_party/java/xalan/BUILD.bazel b/third_party/java/xalan/BUILD.bazel new file mode 100644 index 0000000000000..9a5bc9a57bbbe --- /dev/null +++ b/third_party/java/xalan/BUILD.bazel @@ -0,0 +1,38 @@ +java_import( + name = "serializer", + tags = [ + "maven_coordinates=xalan:serializer:jar:2.7.2", + ], + licenses = [ + "notice", # Apache 2 + ], + jars = ["serializer-2.7.2.jar"], + srcjar = "serializer-2.7.2-sources.jar", + deps = [ + "//third_party/java/xerces:xercesImpl", + "//third_party/java/xml-apis:xml-apis", + ], + visibility = [ + "//java/client/test:__subpackages__", + "//java/server/test:__subpackages__", + ], +) + +java_import( + name = "xalan", + tags = [ + "maven_coordinates=xalan:xalan:jar:2.7.2", + ], + licenses = [ + "notice", # Apache 2 + ], + jars = ["xalan-2.7.2.jar"], + srcjar = "xalan-2.7.2-sources.jar", + deps = [ + ":serializer", + "//third_party/java/xerces:xercesImpl", + ], + visibility = [ + "//third_party/java/htmlunit:__pkg__", + ], +) diff --git a/third_party/java/xerces/BUILD.bazel b/third_party/java/xerces/BUILD.bazel new file mode 100644 index 0000000000000..a0238a04beacd --- /dev/null +++ b/third_party/java/xerces/BUILD.bazel @@ -0,0 +1,19 @@ + +java_import( + name = "xercesImpl", + tags = [ + "maven_coordinates=xerces:xercesImpl:jar:2.11.0", + ], + licenses = [ + "notice", # Apache 2 + ], + jars = ["xercesImpl-2.11.0.jar"], + srcjar = "xercesImpl-2.11.0-sources.jar", + deps = [ + "//third_party/java/xml-apis:xml-apis", + ], + visibility = [ + "//third_party/java/htmlunit:__pkg__", + "//third_party/java/xalan:__pkg__", + ], +) diff --git a/third_party/java/xml-apis/BUILD.bazel b/third_party/java/xml-apis/BUILD.bazel new file mode 100644 index 0000000000000..b1b2702f48581 --- /dev/null +++ b/third_party/java/xml-apis/BUILD.bazel @@ -0,0 +1,18 @@ + +java_import( + name = "xml-apis", + tags = [ + "maven_coordinates=xml-apis:xml-apis:jar:1.4.01", + ], + licenses = [ + "notice", # Apache 2 + ], + jars = ["xml-apis-1.4.01.jar"], + srcjar = "xml-apis-1.4.01-sources.jar", + deps = [ + ], + visibility = [ + "//third_party/java/xalan:__pkg__", + "//third_party/java/xerces:__pkg__", + ], +)