Skip to content

Commit

Permalink
Tidy up maven dependencies for remote.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
shs96c committed Aug 2, 2016
1 parent cb043fa commit f26fd44
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 0 additions & 1 deletion java/client/src/org/openqa/selenium/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
24 changes: 11 additions & 13 deletions java/client/src/org/openqa/selenium/remote/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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 = [
],
)
2 changes: 0 additions & 2 deletions java/client/test/org/openqa/selenium/remote/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion third_party/java/cglib/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -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',
],
)

0 comments on commit f26fd44

Please sign in to comment.