From f26fd4495e32100f25b555d7b9ab704783e14eb0 Mon Sep 17 00:00:00 2001 From: Simon Stewart Date: Tue, 2 Aug 2016 21:25:44 +0100 Subject: [PATCH] Tidy up maven dependencies for remote. When making a rule a maven dependency, it's best to make it the only PUBLIC target in the package. Otherwise, it's possible to transitively depend on things that should be in other packages. --- Rakefile | 2 +- java/client/src/org/openqa/selenium/BUCK | 1 - .../src/org/openqa/selenium/remote/BUCK | 24 +++++++++---------- .../test/org/openqa/selenium/remote/BUCK | 2 -- third_party/java/cglib/BUCK | 2 +- 5 files changed, 13 insertions(+), 18 deletions(-) diff --git a/Rakefile b/Rakefile index ba1ed4c8d8a97..0261c322af3e4 100644 --- a/Rakefile +++ b/Rakefile @@ -116,7 +116,7 @@ JAVA_RELEASE_TARGETS = [ '//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/remote:augmenter', + '//java/client/src/org/openqa/selenium/remote:remote', '//java/client/src/org/openqa/selenium/safari:safari', '//java/client/src/org/openqa/selenium:client-combined', '//java/server/src/com/thoughtworks/selenium:leg-rc', diff --git a/java/client/src/org/openqa/selenium/BUCK b/java/client/src/org/openqa/selenium/BUCK index 571e7f738e9d4..2490c5553e73f 100644 --- a/java/client/src/org/openqa/selenium/BUCK +++ b/java/client/src/org/openqa/selenium/BUCK @@ -144,7 +144,6 @@ java_library( "//java/client/src/org/openqa/selenium/edge:edge", "//java/client/src/org/openqa/selenium/ie:ie", "//java/client/src/org/openqa/selenium/opera:opera", - "//java/client/src/org/openqa/selenium/remote:augmenter", "//java/client/src/org/openqa/selenium/remote:remote", "//java/client/src/org/openqa/selenium/safari:safari", "//java/client/src/org/openqa/selenium/support:support", diff --git a/java/client/src/org/openqa/selenium/remote/BUCK b/java/client/src/org/openqa/selenium/remote/BUCK index 3e6f8efac929e..fc3bb7096a198 100644 --- a/java/client/src/org/openqa/selenium/remote/BUCK +++ b/java/client/src/org/openqa/selenium/remote/BUCK @@ -29,7 +29,7 @@ java_library( srcs = [ 'HttpSessionId.java' ], ) -java_library(name = 'augmenter', +java_library(name = 'remote', maven_coords = 'org.seleniumhq.selenium:selenium-remote-driver:' + SE_VERSION, srcs = [ 'Augmenter.java', @@ -46,20 +46,20 @@ java_library(name = 'augmenter', 'html5/AddWebStorage.java', 'mobile/AddNetworkConnection.java', ], - deps = [ + exported_deps = [ + ':api', ':capabilities', - ':remote', + ':remote-lib', '//java/client/src/org/openqa/selenium:selenium', + ], + deps = [ '//third_party/java/cglib:cglib', '//third_party/java/guava:guava', ], - visibility = [ - '//java/client/src/org/openqa/selenium:client-combined', - '//java/client/test/...', - ], + visibility = ['PUBLIC'], ) -java_library(name = 'remote', +java_library(name = 'remote-lib', srcs = [ 'BeanToJsonConverter.java', 'CommandCodec.java', @@ -109,17 +109,15 @@ java_library(name = 'remote', ] + glob([ 'service/*.java', ]), - exported_deps = [ + deps = [ ':api', ':capabilities', - '//java/client/src/org/openqa/selenium:selenium', - ], - deps = [ ':http-session-id', '//java/client/src/org/openqa/selenium:selenium', '//third_party/java/httpcomponents:httpclient', '//third_party/java/guava:guava', '//third_party/java/gson:gson', ], - visibility = ['PUBLIC'], + visibility = [ + ], ) diff --git a/java/client/test/org/openqa/selenium/remote/BUCK b/java/client/test/org/openqa/selenium/remote/BUCK index decdb655ccbc0..ef2dd0aee9733 100644 --- a/java/client/test/org/openqa/selenium/remote/BUCK +++ b/java/client/test/org/openqa/selenium/remote/BUCK @@ -32,7 +32,6 @@ java_test(name = 'client-tests', ], deps = [ '//java/client/src/org/openqa/selenium:selenium', - '//java/client/src/org/openqa/selenium/remote:augmenter', '//java/client/src/org/openqa/selenium/remote:remote', '//third_party/java/gson:gson', '//third_party/java/guava:guava', @@ -63,7 +62,6 @@ java_library(name = 'remote-driver-test-lib', deps = [ '//java/client/src/org/openqa/selenium:selenium', '//java/client/src/org/openqa/selenium/remote:remote', - '//java/client/src/org/openqa/selenium/remote:augmenter', '//java/client/test/org/openqa/selenium/testing:test-base', '//java/client/test/org/openqa/selenium/testing/drivers:drivers', '//third_party/java/guava:guava', diff --git a/third_party/java/cglib/BUCK b/third_party/java/cglib/BUCK index 34112531b6595..217a15ac8acb3 100644 --- a/third_party/java/cglib/BUCK +++ b/third_party/java/cglib/BUCK @@ -2,7 +2,7 @@ prebuilt_jar(name = 'cglib', maven_coords = 'cglib:cglib-nodep:3.2.4', binary_jar = 'cglib-nodep-3.2.4.jar', visibility = [ - '//java/client/src/org/openqa/selenium/remote:augmenter', + '//java/client/src/org/openqa/selenium/remote:remote', ], )