diff --git a/compute/src/test/java/org/jclouds/compute/BaseComputeServiceLiveTest.java b/compute/src/test/java/org/jclouds/compute/BaseComputeServiceLiveTest.java index 7b37036fb1..80a25d85ab 100755 --- a/compute/src/test/java/org/jclouds/compute/BaseComputeServiceLiveTest.java +++ b/compute/src/test/java/org/jclouds/compute/BaseComputeServiceLiveTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2010 Cloud Conscious, LLC. + * Copyright (C) 2011 Cloud Conscious, LLC. * * ==================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,7 +16,6 @@ * limitations under the License. * ==================================================================== */ - package org.jclouds.compute; import static com.google.common.base.Preconditions.checkNotNull; diff --git a/core/pom.xml b/core/pom.xml index 5a66652899..8a9ad2aa38 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -99,8 +99,8 @@ 1.0 - org.mortbay.jetty - jetty-ssl + org.eclipse.jetty + jetty-security test diff --git a/core/src/test/java/org/jclouds/http/BackoffLimitedRetryJavaTest.java b/core/src/test/java/org/jclouds/http/BackoffLimitedRetryJavaTest.java index 1df0b4a40c..f416011a67 100644 --- a/core/src/test/java/org/jclouds/http/BackoffLimitedRetryJavaTest.java +++ b/core/src/test/java/org/jclouds/http/BackoffLimitedRetryJavaTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2010 Cloud Conscious, LLC. + * Copyright (C) 2011 Cloud Conscious, LLC. * * ==================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,7 +16,6 @@ * limitations under the License. * ==================================================================== */ - package org.jclouds.http; import static org.testng.Assert.assertEquals; @@ -29,9 +28,9 @@ import java.util.concurrent.ExecutionException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.eclipse.jetty.server.Request; import org.jclouds.http.config.JavaUrlHttpCommandExecutorServiceModule; import org.jclouds.http.handlers.BackoffLimitedRetryHandler; -import org.mortbay.jetty.Request; import org.testng.annotations.Test; import com.google.inject.Module; diff --git a/core/src/test/java/org/jclouds/http/BaseJettyTest.java b/core/src/test/java/org/jclouds/http/BaseJettyTest.java index e5d7eaee08..a830fbf88a 100644 --- a/core/src/test/java/org/jclouds/http/BaseJettyTest.java +++ b/core/src/test/java/org/jclouds/http/BaseJettyTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2010 Cloud Conscious, LLC. + * Copyright (C) 2011 Cloud Conscious, LLC. * * ==================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,7 +16,6 @@ * limitations under the License. * ==================================================================== */ - package org.jclouds.http; import static com.google.common.base.Throwables.propagate; @@ -46,6 +45,12 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.core.HttpHeaders; +import org.eclipse.jetty.server.Connector; +import org.eclipse.jetty.server.Handler; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.handler.AbstractHandler; +import org.eclipse.jetty.server.ssl.SslSocketConnector; import org.jclouds.Constants; import org.jclouds.crypto.CryptoStreams; import org.jclouds.io.InputSuppliers; @@ -53,12 +58,6 @@ import org.jclouds.rest.RestContext; import org.jclouds.rest.RestContextBuilder; import org.jclouds.rest.RestContextSpec; import org.jclouds.util.Strings2; -import org.mortbay.jetty.Connector; -import org.mortbay.jetty.Handler; -import org.mortbay.jetty.Request; -import org.mortbay.jetty.Server; -import org.mortbay.jetty.handler.AbstractHandler; -import org.mortbay.jetty.ssl.SslSocketConnector; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Optional; @@ -87,7 +86,7 @@ public abstract class BaseJettyTest { static final Pattern actionPattern = Pattern.compile("/objects/(.*)/action/([a-z]*);?(.*)"); @BeforeTest - @Parameters( { "test-jetty-port" }) + @Parameters({ "test-jetty-port" }) public void setUpJetty(@Optional("8123") final int testPort) throws Exception { this.testPort = testPort; @@ -96,8 +95,8 @@ public abstract class BaseJettyTest { md5 = CryptoStreams.md5Base64(oneHundredOneConstitutions); Handler server1Handler = new AbstractHandler() { - public void handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch) - throws IOException, ServletException { + public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException { if (failIfNoContentLength(request, response)) { return; } else if (target.indexOf("sleep") > 0) { @@ -187,7 +186,7 @@ public abstract class BaseJettyTest { } } else { for (String header : new String[] { "Content-Disposition", HttpHeaders.CONTENT_LANGUAGE, - HttpHeaders.CONTENT_ENCODING }) + HttpHeaders.CONTENT_ENCODING }) if (request.getHeader(header) != null) { response.addHeader("x-" + header, request.getHeader(header)); } @@ -207,8 +206,8 @@ public abstract class BaseJettyTest { protected void setupAndStartSSLServer(final int testPort) throws Exception { Handler server2Handler = new AbstractHandler() { - public void handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch) - throws IOException, ServletException { + public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) + throws IOException, ServletException { if (request.getMethod().equals("PUT")) { if (request.getContentLength() > 0) { response.setStatus(HttpServletResponse.SC_OK); @@ -262,12 +261,12 @@ public abstract class BaseJettyTest { } public static RestContextBuilder newBuilder(int testPort, - Properties properties, Module... connectionModules) { + Properties properties, Module... connectionModules) { properties.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS, "true"); properties.setProperty(Constants.PROPERTY_RELAX_HOSTNAME, "true"); RestContextSpec contextSpec = contextSpec("test", - "http://localhost:" + testPort, "1", "", "identity", null, IntegrationTestClient.class, - IntegrationTestAsyncClient.class, ImmutableSet. copyOf(connectionModules)); + "http://localhost:" + testPort, "1", "", "identity", null, IntegrationTestClient.class, + IntegrationTestAsyncClient.class, ImmutableSet. copyOf(connectionModules)); return createContextBuilder(contextSpec, properties); } @@ -293,7 +292,7 @@ public abstract class BaseJettyTest { */ protected boolean failEveryTenRequests(HttpServletRequest request, HttpServletResponse response) throws IOException { if (cycle.incrementAndGet() % 10 == 0) { - response.sendError(500); + response.sendError(500, "unlucky 10"); ((Request) request).setHandled(true); return true; } @@ -301,7 +300,7 @@ public abstract class BaseJettyTest { } protected boolean redirectEveryTwentyRequests(HttpServletRequest request, HttpServletResponse response) - throws IOException { + throws IOException { if (cycle.incrementAndGet() % 20 == 0) { response.sendRedirect("http://localhost:" + (testPort + 1) + "/"); ((Request) request).setHandled(true); @@ -325,7 +324,7 @@ public abstract class BaseJettyTest { if (realHeaders.get(CONTENT_LENGTH) == null) { response.getWriter().println("no content length!"); response.getWriter().println(realHeaders.toString()); - response.sendError(500); + response.sendError(500, "no content length!"); ((Request) request).setHandled(true); return true; } diff --git a/core/src/test/java/org/jclouds/http/functions/ParseURIFromListOrLocationHeaderIf20xTest.java b/core/src/test/java/org/jclouds/http/functions/ParseURIFromListOrLocationHeaderIf20xTest.java index 96f7fcc343..7c65aa72e6 100644 --- a/core/src/test/java/org/jclouds/http/functions/ParseURIFromListOrLocationHeaderIf20xTest.java +++ b/core/src/test/java/org/jclouds/http/functions/ParseURIFromListOrLocationHeaderIf20xTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2010 Cloud Conscious, LLC. + * Copyright (C) 2011 Cloud Conscious, LLC. * * ==================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,7 +16,6 @@ * limitations under the License. * ==================================================================== */ - package org.jclouds.http.functions; import static org.easymock.EasyMock.expect; @@ -33,11 +32,11 @@ import java.util.concurrent.TimeoutException; import javax.inject.Provider; import javax.ws.rs.core.UriBuilder; +import org.eclipse.jetty.http.HttpHeaders; import org.jclouds.http.HttpResponse; import org.jclouds.io.Payload; import org.jclouds.rest.internal.GeneratedHttpRequest; import org.jclouds.util.Strings2; -import org.mortbay.jetty.HttpHeaders; import org.testng.annotations.Test; import com.google.common.base.Function; diff --git a/core/src/test/java/org/jclouds/rest/BaseRestClientTest.java b/core/src/test/java/org/jclouds/rest/BaseRestClientTest.java index 824b0d1b43..747ca834c4 100644 --- a/core/src/test/java/org/jclouds/rest/BaseRestClientTest.java +++ b/core/src/test/java/org/jclouds/rest/BaseRestClientTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2010 Cloud Conscious, LLC. + * Copyright (C) 2011 Cloud Conscious, LLC. * * ==================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,13 +16,12 @@ * limitations under the License. * ==================================================================== */ - package org.jclouds.rest; import static com.google.common.base.Throwables.propagate; import static org.easymock.classextension.EasyMock.createMock; import static org.jclouds.http.HttpUtils.sortAndConcatHeadersIntoString; -import static org.mortbay.jetty.HttpHeaders.TRANSFER_ENCODING; +import static org.eclipse.jetty.http.HttpHeaders.TRANSFER_ENCODING; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; diff --git a/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java b/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java index 0b9c7f7904..2ea0ee7ae4 100755 --- a/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java +++ b/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java @@ -1,6 +1,6 @@ /** * - * Copyright (C) 2010 Cloud Conscious, LLC. + * Copyright (C) 2011 Cloud Conscious, LLC. * * ==================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,7 +16,6 @@ * limitations under the License. * ==================================================================== */ - package org.jclouds.rest.internal; import static com.google.common.base.Charsets.UTF_8; @@ -77,6 +76,7 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriBuilder; import org.easymock.IArgumentMatcher; +import org.eclipse.jetty.http.HttpHeaders; import org.jclouds.concurrent.Timeout; import org.jclouds.crypto.Crypto; import org.jclouds.date.DateService; @@ -134,7 +134,6 @@ import org.jclouds.rest.binders.BindToJsonPayload; import org.jclouds.rest.binders.BindToStringPayload; import org.jclouds.rest.config.RestClientModule; import org.jclouds.util.Strings2; -import org.mortbay.jetty.HttpHeaders; import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; diff --git a/drivers/apachehc/pom.xml b/drivers/apachehc/pom.xml index efd98a67a7..1d5e190a61 100644 --- a/drivers/apachehc/pom.xml +++ b/drivers/apachehc/pom.xml @@ -65,8 +65,8 @@ compile - org.mortbay.jetty - jetty-ssl + org.eclipse.jetty + jetty-security test diff --git a/drivers/enterprise/pom.xml b/drivers/enterprise/pom.xml index 4cbbb58d30..7e518d7dda 100644 --- a/drivers/enterprise/pom.xml +++ b/drivers/enterprise/pom.xml @@ -62,24 +62,14 @@ jclouds-joda ${project.version} - - joda-time - joda-time - 1.6.2 - ${project.groupId} jclouds-bouncycastle ${project.version} - org.bouncycastle - bcprov-jdk15 - 1.44 - - - org.mortbay.jetty - jetty-ssl + org.eclipse.jetty + jetty-security test diff --git a/drivers/gae/pom.xml b/drivers/gae/pom.xml index 3a32d7d756..235d90b3d9 100644 --- a/drivers/gae/pom.xml +++ b/drivers/gae/pom.xml @@ -65,8 +65,8 @@ test - org.mortbay.jetty - jetty-ssl + org.eclipse.jetty + jetty-security test diff --git a/project/pom.xml b/project/pom.xml index 25a7f1bd75..9e0e182742 100644 --- a/project/pom.xml +++ b/project/pom.xml @@ -193,9 +193,9 @@ - org.mortbay.jetty - jetty-ssl - 7.0.0.pre5 + org.eclipse.jetty + jetty-security + 7.4.0.RC0 com.jcraft @@ -208,7 +208,7 @@ org.testng testng - 5.14.10 + 6.0.1 test diff --git a/sandbox-drivers/asynchttpclient/pom.xml b/sandbox-drivers/asynchttpclient/pom.xml index 877831cf0e..503de740e4 100644 --- a/sandbox-drivers/asynchttpclient/pom.xml +++ b/sandbox-drivers/asynchttpclient/pom.xml @@ -64,8 +64,8 @@ 1.4.1 - org.mortbay.jetty - jetty-ssl + org.eclipse.jetty + jetty-security test