Skip to content

Commit f26fd44

Browse files
committed
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.
1 parent cb043fa commit f26fd44

File tree

5 files changed

+13
-18
lines changed

5 files changed

+13
-18
lines changed

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ JAVA_RELEASE_TARGETS = [
116116
'//java/client/src/org/openqa/selenium/firefox:firefox',
117117
'//java/client/src/org/openqa/selenium/ie:ie',
118118
'//java/client/src/org/openqa/selenium/opera:opera',
119-
'//java/client/src/org/openqa/selenium/remote:augmenter',
119+
'//java/client/src/org/openqa/selenium/remote:remote',
120120
'//java/client/src/org/openqa/selenium/safari:safari',
121121
'//java/client/src/org/openqa/selenium:client-combined',
122122
'//java/server/src/com/thoughtworks/selenium:leg-rc',

java/client/src/org/openqa/selenium/BUCK

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ java_library(
144144
"//java/client/src/org/openqa/selenium/edge:edge",
145145
"//java/client/src/org/openqa/selenium/ie:ie",
146146
"//java/client/src/org/openqa/selenium/opera:opera",
147-
"//java/client/src/org/openqa/selenium/remote:augmenter",
148147
"//java/client/src/org/openqa/selenium/remote:remote",
149148
"//java/client/src/org/openqa/selenium/safari:safari",
150149
"//java/client/src/org/openqa/selenium/support:support",

java/client/src/org/openqa/selenium/remote/BUCK

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ java_library(
2929
srcs = [ 'HttpSessionId.java' ],
3030
)
3131

32-
java_library(name = 'augmenter',
32+
java_library(name = 'remote',
3333
maven_coords = 'org.seleniumhq.selenium:selenium-remote-driver:' + SE_VERSION,
3434
srcs = [
3535
'Augmenter.java',
@@ -46,20 +46,20 @@ java_library(name = 'augmenter',
4646
'html5/AddWebStorage.java',
4747
'mobile/AddNetworkConnection.java',
4848
],
49-
deps = [
49+
exported_deps = [
50+
':api',
5051
':capabilities',
51-
':remote',
52+
':remote-lib',
5253
'//java/client/src/org/openqa/selenium:selenium',
54+
],
55+
deps = [
5356
'//third_party/java/cglib:cglib',
5457
'//third_party/java/guava:guava',
5558
],
56-
visibility = [
57-
'//java/client/src/org/openqa/selenium:client-combined',
58-
'//java/client/test/...',
59-
],
59+
visibility = ['PUBLIC'],
6060
)
6161

62-
java_library(name = 'remote',
62+
java_library(name = 'remote-lib',
6363
srcs = [
6464
'BeanToJsonConverter.java',
6565
'CommandCodec.java',
@@ -109,17 +109,15 @@ java_library(name = 'remote',
109109
] + glob([
110110
'service/*.java',
111111
]),
112-
exported_deps = [
112+
deps = [
113113
':api',
114114
':capabilities',
115-
'//java/client/src/org/openqa/selenium:selenium',
116-
],
117-
deps = [
118115
':http-session-id',
119116
'//java/client/src/org/openqa/selenium:selenium',
120117
'//third_party/java/httpcomponents:httpclient',
121118
'//third_party/java/guava:guava',
122119
'//third_party/java/gson:gson',
123120
],
124-
visibility = ['PUBLIC'],
121+
visibility = [
122+
],
125123
)

java/client/test/org/openqa/selenium/remote/BUCK

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ java_test(name = 'client-tests',
3232
],
3333
deps = [
3434
'//java/client/src/org/openqa/selenium:selenium',
35-
'//java/client/src/org/openqa/selenium/remote:augmenter',
3635
'//java/client/src/org/openqa/selenium/remote:remote',
3736
'//third_party/java/gson:gson',
3837
'//third_party/java/guava:guava',
@@ -63,7 +62,6 @@ java_library(name = 'remote-driver-test-lib',
6362
deps = [
6463
'//java/client/src/org/openqa/selenium:selenium',
6564
'//java/client/src/org/openqa/selenium/remote:remote',
66-
'//java/client/src/org/openqa/selenium/remote:augmenter',
6765
'//java/client/test/org/openqa/selenium/testing:test-base',
6866
'//java/client/test/org/openqa/selenium/testing/drivers:drivers',
6967
'//third_party/java/guava:guava',

third_party/java/cglib/BUCK

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ prebuilt_jar(name = 'cglib',
22
maven_coords = 'cglib:cglib-nodep:3.2.4',
33
binary_jar = 'cglib-nodep-3.2.4.jar',
44
visibility = [
5-
'//java/client/src/org/openqa/selenium/remote:augmenter',
5+
'//java/client/src/org/openqa/selenium/remote:remote',
66
],
77
)
88

0 commit comments

Comments
 (0)