Skip to content

Commit

Permalink
Server: Moving shared classes to a more appropriate place out of the …
Browse files Browse the repository at this point in the history
…legacy server namespace
  • Loading branch information
barancev committed Oct 15, 2015
1 parent ac509dd commit 76363f3
Show file tree
Hide file tree
Showing 15 changed files with 48 additions and 28 deletions.
2 changes: 1 addition & 1 deletion java/server/src/org/openqa/grid/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ java_library(name = 'grid',
'//java/client/src/org/openqa/selenium/remote:remote',
'//java/server/src/org/openqa/grid/common:common',
'//java/server/src/org/openqa/selenium/remote/server/log:log',
"//java/server/src/org/openqa/selenium/server:shared",
"//java/server/src/org/openqa/grid/shared:interfaces",
'//third_party/java/gson:gson',
'//third_party/java/guava-libraries:guava-libraries',
'//third_party/java/httpcomponents:httpclient',
Expand Down
1 change: 1 addition & 0 deletions java/server/src/org/openqa/grid/build.desc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ java_library(name = "grid",
"//java/client/src/org/openqa/selenium:webdriver-api",
"//java/client/src/org/openqa/selenium/chrome",
"//java/server/src/org/openqa/grid/common",
"//java/server/src/org/openqa/grid/shared:interfaces",
"//java/server/src/org/openqa/selenium/remote/server",
"//third_party/java/httpcomponents:httpclient",
"//third_party/java/guava-libraries",
Expand Down
2 changes: 1 addition & 1 deletion java/server/src/org/openqa/grid/common/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ java_library(name = 'common',
'//java/client/src/org/openqa/selenium:platform',
'//java/client/src/org/openqa/selenium/net:net',
'//java/client/src/org/openqa/selenium/remote:remote',
'//java/server/src/org/openqa/selenium/server:shared',
'//java/server/src/org/openqa/grid/shared:cli',
'//third_party/java/gson:gson',
'//third_party/java/guava-libraries:guava-libraries',
],
Expand Down
2 changes: 1 addition & 1 deletion java/server/src/org/openqa/grid/common/GridDocHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.google.gson.JsonIOException;
import com.google.gson.JsonParser;

import org.openqa.selenium.server.shared.CliUtils;
import org.openqa.grid.shared.CliUtils;

import java.io.InputStream;
import java.io.InputStreamReader;
Expand Down
2 changes: 1 addition & 1 deletion java/server/src/org/openqa/grid/common/build.desc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ java_library(name = "common",
deps = [
"//java/client/src/org/openqa/selenium/net",
"//java/client/src/org/openqa/selenium/remote:common",
"//java/server/src/org/openqa/selenium/server:shared",
"//java/server/src/org/openqa/grid/shared:cli",
"//third_party/java/guava-libraries",
])
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import static org.openqa.grid.common.RegistrationRequest.AUTO_REGISTER;

import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;

Expand All @@ -36,16 +35,14 @@
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.internal.HttpClientFactory;
import org.openqa.selenium.remote.server.log.LoggingManager;
import org.openqa.selenium.server.shared.IServer;
import org.openqa.grid.shared.IServer;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.security.InvalidParameterException;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;

Expand Down
2 changes: 2 additions & 0 deletions java/server/src/org/openqa/grid/selenium/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ java_library(name = 'classes',
'//java/client/src/org/openqa/selenium/remote:capabilities',
'//java/server/src/org/openqa/grid/common:common',
'//java/server/src/org/openqa/grid:grid',
'//java/server/src/org/openqa/grid/shared:cli',
'//java/server/src/org/openqa/grid/shared:interfaces',
'//java/server/src/org/openqa/selenium/remote/server/log:log',
'//java/server/src/org/openqa/selenium/server:server',
'//third_party/java/gson:gson',
Expand Down
2 changes: 1 addition & 1 deletion java/server/src/org/openqa/grid/selenium/GridLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import org.openqa.selenium.remote.server.log.LoggingOptions;
import org.openqa.selenium.remote.server.log.TerseFormatter;
import org.openqa.selenium.server.SeleniumServer;
import org.openqa.selenium.server.shared.CliUtils;
import org.openqa.grid.shared.CliUtils;

import java.io.File;
import java.io.IOException;
Expand Down
19 changes: 19 additions & 0 deletions java/server/src/org/openqa/grid/shared/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
java_library(name = 'cli',
srcs = glob(['CliUtils.java']),
visibility = [
'//java/server/src/org/openqa/grid:grid',
'//java/server/src/org/openqa/grid/common:common',
'//java/server/src/org/openqa/grid/selenium:classes',
'//java/server/src/org/openqa/selenium/server:server',
],
)

java_library(name = 'interfaces',
srcs = glob(['IServer.java']),
visibility = [
'//java/server/src/org/openqa/grid:grid',
'//java/server/src/org/openqa/grid/common:common',
'//java/server/src/org/openqa/grid/selenium:classes',
'//java/server/src/org/openqa/selenium/server:server',
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

package org.openqa.selenium.server.shared;
package org.openqa.grid.shared;

import java.io.File;
import java.io.PrintStream;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.openqa.selenium.server.shared;
package org.openqa.grid.shared;

public interface IServer {
void boot() throws Exception;
Expand Down
11 changes: 11 additions & 0 deletions java/server/src/org/openqa/grid/shared/build.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

java_library(name = "cli",
srcs = [
"CliUtils.java",
])

java_library(name = "interfaces",
srcs = [
"IServer.java",
])

10 changes: 2 additions & 8 deletions java/server/src/org/openqa/selenium/server/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ java_library(name = 'server',
'//java/server/src/org/openqa/selenium/remote/server:server',
'//java/server/src/org/openqa/selenium/remote/server:sessions',
'//java/server/src/org/openqa/selenium/remote/server/log:log',
'//java/server/src/org/openqa/grid/shared:cli',
'//java/server/src/org/openqa/grid/shared:interfaces',
':selenium-core',
'//third_party/java/commons-logging:commons-logging',
'//third_party/java/guava-libraries:guava-libraries',
Expand All @@ -38,14 +40,6 @@ java_library(name = 'server',
],
)

java_library(name = 'shared',
srcs = glob(['shared/*.java']),
visibility = [
'//java/server/src/org/openqa/grid:grid',
'//java/server/src/org/openqa/grid/common:common',
],
)

prebuilt_jar(name = 'selenium-core',
binary_jar = '//javascript/selenium-core:selenium-core',
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package org.openqa.selenium.server;

import static java.lang.String.format;
import static org.openqa.selenium.server.shared.CliUtils.printWrappedLine;
import static org.openqa.grid.shared.CliUtils.printWrappedLine;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Expand All @@ -43,7 +43,7 @@
import org.openqa.selenium.server.htmlrunner.HTMLResultsListener;
import org.openqa.selenium.server.htmlrunner.SeleniumHTMLRunnerResultsHandler;
import org.openqa.selenium.server.htmlrunner.SingleTestSuiteResourceHandler;
import org.openqa.selenium.server.shared.IServer;
import org.openqa.grid.shared.IServer;

import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
Expand Down Expand Up @@ -806,7 +806,7 @@ protected static void checkArgsSanity(RemoteControlConfiguration configuration)
(InjectionHelper.userContentTransformationsExist() ||
InjectionHelper.userJsInjectionsExist())) {
usage("-userJsInjection and -userContentTransformation are only " +
"valid in combination with -proxyInjectionMode");
"valid in combination with -proxyInjectionMode");
System.exit(1);
}
}
Expand Down
8 changes: 2 additions & 6 deletions java/server/src/org/openqa/selenium/server/build.desc
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,10 @@ java_library(name = "base",
"//java/client/src/org/openqa/selenium/browserlaunchers/locators",
"//java/client/src/org/openqa/selenium/net",
"//java/client/src/org/openqa/selenium/support",
"//java/server/src/org/openqa/grid/shared:cli",
"//java/server/src/org/openqa/grid/shared:interfaces",
"//java/server/src/cybervillains",
"//java/server/src/org/openqa/selenium/remote/server",
"//third_party/java/jetty:jetty-for-rc",
"//third_party/java/servlet:servlet-api"
])

java_library(name = "shared",
srcs = [
"shared/*.java",
])

0 comments on commit 76363f3

Please sign in to comment.