Skip to content

Commit fdac9cc

Browse files
committed
Prepare for the maven publish from Buck.
This means that we need to prepare the libraries so that the dependencies of the maven modules is modelled in the BUCK files. This involves a certain amount of jiggery-pokery. Although this isn't complete, we get a lot closer to being able to do the libraries under //java/client/src/... with this change. In order to create the jars correctly, this will also need a buck version bump.
1 parent 2d0ec03 commit fdac9cc

File tree

53 files changed

+142
-196
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+142
-196
lines changed

Rakefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,18 @@ crazy_fun.create_tasks(Dir["**/build.desc"])
103103
# This is because the buck integration creates a rule for "//.*"
104104
require 'rake-tasks/buck'
105105

106+
# Java targets required for release. These should all have the correct maven_coords set.
107+
JAVA_RELEASE_TARGETS = [
108+
'//java/client/src/org/openqa/selenium:core',
109+
'//java/client/src/org/openqa/selenium:selenium',
110+
'//java/client/src/org/openqa/selenium/chrome:chrome',
111+
'//java/client/src/org/openqa/selenium/edge:edge',
112+
'//java/client/src/org/openqa/selenium/firefox:firefox',
113+
'//java/client/src/org/openqa/selenium/ie:ie',
114+
'//java/client/src/org/openqa/selenium/remote:remote',
115+
'//java/client/src/org/openqa/selenium/safari:safari',
116+
]
117+
106118

107119
# Notice that because we're using rake, anything you can do in a normal rake
108120
# build can also be done here. For example, here we set the default task
@@ -526,7 +538,7 @@ task :push_release => [:release] do
526538
end
527539

528540
desc 'Build the selenium client jars'
529-
task 'selenium-java' => '//java/client/src/org/openqa/selenium:client-combined-v3:project'
541+
task 'selenium-java' => '//java/client/src/org/openqa/selenium:selenium-java'
530542

531543
desc 'Build and package Selenium IDE'
532544
task :release_ide => [:ide] do

java/client/src/com/thoughtworks/selenium/BUCK

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ java_library(name = 'selenium',
2626
'//java/client/src/com/thoughtworks/selenium/condition:condition',
2727
],
2828
deps = [
29-
'//java/client/src/org/openqa/selenium:webdriver-api',
30-
'//java/client/src/org/openqa/selenium/net:net',
29+
'//java/client/src/org/openqa/selenium:selenium',
3130
'//third_party/java/guava:guava',
3231
'//third_party/java/junit:junit',
3332
'//third_party/java/testng:testng',

java/client/src/com/thoughtworks/selenium/webdriven/BUCK

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ java_library(name = 'webdriven',
3333
deps = [
3434
'//java/client/src/com/thoughtworks/selenium:selenium',
3535
'//java/client/src/com/thoughtworks/selenium/webdriven/commands:commands',
36-
'//java/client/src/org/openqa/selenium:webdriver-api',
36+
'//java/client/src/org/openqa/selenium:selenium',
3737
'//third_party/java/guava:guava',
3838
],
3939
visibility = [
@@ -59,7 +59,7 @@ java_library(name = 'emulation-api',
5959
],
6060
deps = [
6161
'//java/client/src/com/thoughtworks/selenium:api',
62-
'//java/client/src/org/openqa/selenium:webdriver-api',
62+
'//java/client/src/org/openqa/selenium:selenium',
6363
'//third_party/java/guava:guava',
6464
],
6565
visibility = [

java/client/src/com/thoughtworks/selenium/webdriven/commands/BUCK

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ java_library(name = 'commands',
44
deps = [
55
'//java/client/src/com/thoughtworks/selenium:api',
66
'//java/client/src/com/thoughtworks/selenium/webdriven:emulation-api',
7-
'//java/client/src/org/openqa/selenium:webdriver-api',
8-
'//java/client/src/org/openqa/selenium/io:io',
7+
'//java/client/src/org/openqa/selenium:selenium',
98
'//third_party/java/guava:guava',
109
],
1110
visibility = [

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

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
java_library(name = 'webdriver-api',
1+
java_library(name = 'selenium',
2+
maven_coords = 'org.seleniumhq.selenium:selenium-java:2.49.0',
23
exported_deps = [
34
':beta',
5+
':codecs',
46
':core',
57
':exceptions',
68
':platform',
79
':primitives',
810
'//java/client/src/org/openqa/selenium/interactions:interactions',
9-
'//java/client/src/org/openqa/selenium/interactions:exceptions',
11+
'//java/client/src/org/openqa/selenium/io:io',
1012
'//java/client/src/org/openqa/selenium/logging:api',
13+
'//java/client/src/org/openqa/selenium/logging:logging',
14+
'//java/client/src/org/openqa/selenium/net:net',
15+
'//java/client/src/org/openqa/selenium/os:os',
1116
'//java/client/src/org/openqa/selenium/security:security',
1217
],
1318
visibility = ['PUBLIC'],
@@ -22,7 +27,7 @@ java_library(
2227
)
2328

2429
java_library(name = 'core',
25-
maven_coords = "org.seleniumhq.selenium:selenium-api:2.49.0",
30+
maven_coords = 'org.seleniumhq.selenium:selenium-api:2.49.0',
2631
srcs = [
2732
'Alert.java',
2833
'By.java',
@@ -71,7 +76,12 @@ java_library(name = 'core',
7176

7277
java_library(name = 'beta',
7378
srcs = [ 'Beta.java' ],
74-
visibility = [ 'PUBLIC' ],
79+
visibility = [
80+
'//java/client/src/org/openqa/selenium/logging:api',
81+
'//java/client/src/org/openqa/selenium/logging:logging',
82+
'//java/client/src/org/openqa/selenium/os:os',
83+
'//java/client/src/org/openqa/selenium/security:security',
84+
],
7585
)
7686

7787
java_library(name = 'exceptions',
@@ -100,6 +110,8 @@ java_library(name = 'exceptions',
100110
visibility = [
101111
'//java/client/src/org/openqa/selenium/interactions:exceptions',
102112
'//java/client/src/org/openqa/selenium/io:io',
113+
'//java/client/src/org/openqa/selenium/net:net',
114+
'//java/client/src/org/openqa/selenium/os:os',
103115
'//java/client/test/org/openqa/selenium/testing:helpers',
104116
],
105117
)
@@ -113,7 +125,11 @@ java_library(
113125
deps = [
114126
':exceptions',
115127
],
116-
visibility = ['PUBLIC'],
128+
visibility = [
129+
'//java/client/src/org/openqa/selenium/io:io',
130+
'//java/client/src/org/openqa/selenium/net:net',
131+
'//java/client/src/org/openqa/selenium/os:os',
132+
],
117133
)
118134

119135
java_library(name = 'primitives',
@@ -126,16 +142,3 @@ java_library(name = 'primitives',
126142
'//java/client/src/org/openqa/selenium/interactions:core',
127143
],
128144
)
129-
130-
java_binary(name = 'selenium-java',
131-
deps = [
132-
':webdriver-api',
133-
'//java/client/src/org/openqa/selenium/ie:ie',
134-
'//java/client/src/org/openqa/selenium/chrome:chrome',
135-
'//java/client/src/org/openqa/selenium/firefox:firefox',
136-
'//java/client/src/org/openqa/selenium/lift:lift',
137-
'//java/client/src/org/openqa/selenium/remote:remote',
138-
'//java/client/src/org/openqa/selenium/safari:safari',
139-
'//java/client/src/org/openqa/selenium/support:support',
140-
],
141-
)

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
java_library(name = 'locators',
22
srcs = glob(['*.java']),
33
deps = [
4-
'//java/client/src/org/openqa/selenium/io:io',
5-
'//java/client/src/org/openqa/selenium/os:os',
6-
'//java/client/src/org/openqa/selenium/remote:capabilities',
7-
'//java/client/src/org/openqa/selenium:platform',
4+
'//java/client/src/org/openqa/selenium:selenium',
5+
'//java/client/src/org/openqa/selenium/remote:remote',
86
'//third_party/java/guava:guava',
97
],
108
visibility = [

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
java_library(
22
name = 'chrome',
3+
maven_coords = 'org.seleniumhq.selenium:selenium-chrome-driver:2.49.0',
34
srcs = glob(['*.java']),
45
deps = [
5-
'//java/client/src/org/openqa/selenium:codecs',
6-
'//java/client/src/org/openqa/selenium:webdriver-api',
7-
'//java/client/src/org/openqa/selenium/logging:logging',
8-
'//java/client/src/org/openqa/selenium/net:net',
9-
'//java/client/src/org/openqa/selenium/remote:api',
10-
'//java/client/src/org/openqa/selenium/remote:capabilities',
6+
'//java/client/src/org/openqa/selenium:selenium',
117
'//java/client/src/org/openqa/selenium/remote:remote',
12-
'//java/client/src/org/openqa/selenium/remote/service:service',
138
'//third_party/java/gson:gson',
149
'//third_party/java/guava:guava',
1510
],

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
java_library(
22
name = 'edge',
3+
maven_coords = 'org.seleniumhq.selenium:selenium-edge-driver:2.49.0',
34
srcs = glob(['*.java']),
45
deps = [
5-
'//java/client/src/org/openqa/selenium:codecs',
6-
'//java/client/src/org/openqa/selenium:webdriver-api',
7-
'//java/client/src/org/openqa/selenium/logging:logging',
8-
'//java/client/src/org/openqa/selenium/net:net',
9-
'//java/client/src/org/openqa/selenium/remote:api',
10-
'//java/client/src/org/openqa/selenium/remote:capabilities',
6+
'//java/client/src/org/openqa/selenium:selenium',
117
'//java/client/src/org/openqa/selenium/remote:remote',
12-
'//java/client/src/org/openqa/selenium/remote/service:service',
138
'//third_party/java/gson:gson',
149
'//third_party/java/guava:guava',
1510
],

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,8 @@ java_library(name = 'firefox',
77
],
88
deps = [
99
':prefs',
10-
'//java/client/src/org/openqa/selenium:webdriver-api',
11-
'//java/client/src/org/openqa/selenium/io:io',
12-
'//java/client/src/org/openqa/selenium/net:net',
13-
'//java/client/src/org/openqa/selenium/os:os',
10+
'//java/client/src/org/openqa/selenium:selenium',
1411
'//java/client/src/org/openqa/selenium/remote:remote',
15-
'//java/client/src/org/openqa/selenium/remote/service:service',
1612
'//third_party/java/guava:guava',
1713
],
1814
visibility = [ 'PUBLIC' ],

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
java_library(name = 'ie',
2+
maven_coords = 'org.seleniumhq.selenium:selenium-ie-driver:2.49.0',
23
srcs = glob(['*.java']),
34
deps = [
4-
'//java/client/src/org/openqa/selenium/net:net',
5-
'//java/client/src/org/openqa/selenium/remote/service:service',
5+
'//java/client/src/org/openqa/selenium:selenium',
66
'//java/client/src/org/openqa/selenium/remote:remote',
7-
'//java/client/src/org/openqa/selenium:webdriver-api',
87
'//third_party/java/guava:guava',
98
],
109
visibility = [ 'PUBLIC' ],

0 commit comments

Comments
 (0)