diff --git a/aws/ec2/core/src/main/java/org/jclouds/aws/ec2/commands/options/EC2RequestOptions.java b/aws/ec2/core/src/main/java/org/jclouds/aws/ec2/commands/options/EC2RequestOptions.java index 724bffc108..4e2ecd9f09 100644 --- a/aws/ec2/core/src/main/java/org/jclouds/aws/ec2/commands/options/EC2RequestOptions.java +++ b/aws/ec2/core/src/main/java/org/jclouds/aws/ec2/commands/options/EC2RequestOptions.java @@ -27,7 +27,7 @@ import org.jclouds.aws.ec2.reference.EC2Constants; import org.jclouds.http.options.HttpRequestOptions; import org.joda.time.DateTime; -import com.google.inject.name.Named; +import javax.inject.Named; /** * diff --git a/aws/ec2/core/src/main/java/org/jclouds/aws/ec2/internal/GuiceEC2Context.java b/aws/ec2/core/src/main/java/org/jclouds/aws/ec2/internal/GuiceEC2Context.java index 35c03fe1a2..e5767dce6e 100644 --- a/aws/ec2/core/src/main/java/org/jclouds/aws/ec2/internal/GuiceEC2Context.java +++ b/aws/ec2/core/src/main/java/org/jclouds/aws/ec2/internal/GuiceEC2Context.java @@ -32,7 +32,7 @@ import org.jclouds.aws.ec2.EC2Context; import org.jclouds.lifecycle.Closer; import org.jclouds.logging.Logger; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.Injector; /** diff --git a/aws/s3/core/src/main/java/org/jclouds/aws/s3/binders/S3ObjectBinder.java b/aws/s3/core/src/main/java/org/jclouds/aws/s3/binders/S3ObjectBinder.java index 32c576ebd8..6b8f3cc072 100644 --- a/aws/s3/core/src/main/java/org/jclouds/aws/s3/binders/S3ObjectBinder.java +++ b/aws/s3/core/src/main/java/org/jclouds/aws/s3/binders/S3ObjectBinder.java @@ -33,8 +33,8 @@ import org.jclouds.blobstore.binders.BlobBinder; import org.jclouds.blobstore.domain.Blob; import org.jclouds.http.HttpRequest; -import com.google.inject.Inject; -import com.google.inject.name.Named; +import javax.inject.Inject; +import javax.inject.Named; public class S3ObjectBinder extends BlobBinder { @Inject diff --git a/aws/s3/core/src/main/java/org/jclouds/aws/s3/config/RestS3ConnectionModule.java b/aws/s3/core/src/main/java/org/jclouds/aws/s3/config/RestS3ConnectionModule.java index b96402a156..6f0d547aee 100644 --- a/aws/s3/core/src/main/java/org/jclouds/aws/s3/config/RestS3ConnectionModule.java +++ b/aws/s3/core/src/main/java/org/jclouds/aws/s3/config/RestS3ConnectionModule.java @@ -46,11 +46,11 @@ import org.jclouds.rest.RestClientFactory; import org.jclouds.rest.config.JaxrsModule; import com.google.inject.AbstractModule; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.Provides; import com.google.inject.Scopes; -import com.google.inject.Singleton; -import com.google.inject.name.Named; +import javax.inject.Singleton; +import javax.inject.Named; /** * Configures the S3 connection, including logging and http transport. diff --git a/aws/s3/core/src/main/java/org/jclouds/aws/s3/domain/S3Object.java b/aws/s3/core/src/main/java/org/jclouds/aws/s3/domain/S3Object.java index b8ac36a26f..56527aa7e3 100644 --- a/aws/s3/core/src/main/java/org/jclouds/aws/s3/domain/S3Object.java +++ b/aws/s3/core/src/main/java/org/jclouds/aws/s3/domain/S3Object.java @@ -25,7 +25,7 @@ package org.jclouds.aws.s3.domain; import org.jclouds.blobstore.domain.Blob; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.assistedinject.Assisted; /** diff --git a/aws/s3/core/src/main/java/org/jclouds/aws/s3/filters/RequestAuthorizeSignature.java b/aws/s3/core/src/main/java/org/jclouds/aws/s3/filters/RequestAuthorizeSignature.java index 66cd421f44..3717aa6672 100644 --- a/aws/s3/core/src/main/java/org/jclouds/aws/s3/filters/RequestAuthorizeSignature.java +++ b/aws/s3/core/src/main/java/org/jclouds/aws/s3/filters/RequestAuthorizeSignature.java @@ -42,9 +42,9 @@ import org.jclouds.http.HttpUtils; import org.jclouds.util.DateService; import com.google.common.annotations.VisibleForTesting; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.inject.name.Named; +import javax.inject.Inject; +import javax.inject.Singleton; +import javax.inject.Named; /** * Signs the S3 request. This will update timestamps at most once per second. diff --git a/aws/s3/core/src/main/java/org/jclouds/aws/s3/functions/ParseObjectFromHeadersAndHttpContent.java b/aws/s3/core/src/main/java/org/jclouds/aws/s3/functions/ParseObjectFromHeadersAndHttpContent.java index fd798b38ad..11895063d6 100644 --- a/aws/s3/core/src/main/java/org/jclouds/aws/s3/functions/ParseObjectFromHeadersAndHttpContent.java +++ b/aws/s3/core/src/main/java/org/jclouds/aws/s3/functions/ParseObjectFromHeadersAndHttpContent.java @@ -27,7 +27,7 @@ import org.jclouds.aws.s3.domain.ObjectMetadata; import org.jclouds.aws.s3.domain.S3Object; import org.jclouds.blobstore.functions.ParseBlobFromHeadersAndHttpContent; -import com.google.inject.Inject; +import javax.inject.Inject; /** * Parses response headers and creates a new S3Object from them and the HTTP content. diff --git a/aws/s3/core/src/main/java/org/jclouds/aws/s3/functions/ParseObjectMetadataFromHeaders.java b/aws/s3/core/src/main/java/org/jclouds/aws/s3/functions/ParseObjectMetadataFromHeaders.java index a703d89ff1..261d8452ac 100644 --- a/aws/s3/core/src/main/java/org/jclouds/aws/s3/functions/ParseObjectMetadataFromHeaders.java +++ b/aws/s3/core/src/main/java/org/jclouds/aws/s3/functions/ParseObjectMetadataFromHeaders.java @@ -35,8 +35,8 @@ import org.jclouds.http.HttpUtils; import org.jclouds.util.DateService; import com.google.common.annotations.VisibleForTesting; -import com.google.inject.Inject; -import com.google.inject.name.Named; +import javax.inject.Inject; +import javax.inject.Named; /** * This parses @{link {@link org.jclouds.aws.s3.domain.ObjectMetadata} from HTTP headers. diff --git a/aws/s3/core/src/main/java/org/jclouds/aws/s3/handlers/AWSClientErrorRetryHandler.java b/aws/s3/core/src/main/java/org/jclouds/aws/s3/handlers/AWSClientErrorRetryHandler.java index 7c1b32cdb8..b1cd901876 100644 --- a/aws/s3/core/src/main/java/org/jclouds/aws/s3/handlers/AWSClientErrorRetryHandler.java +++ b/aws/s3/core/src/main/java/org/jclouds/aws/s3/handlers/AWSClientErrorRetryHandler.java @@ -35,8 +35,8 @@ import org.jclouds.http.HttpRetryHandler; import org.jclouds.logging.Logger; import org.jclouds.util.Utils; -import com.google.inject.Inject; -import com.google.inject.name.Named; +import javax.inject.Inject; +import javax.inject.Named; /** * Handles Retryable responses with error codes in the 3xx range diff --git a/aws/s3/core/src/main/java/org/jclouds/aws/s3/handlers/AWSRedirectionRetryHandler.java b/aws/s3/core/src/main/java/org/jclouds/aws/s3/handlers/AWSRedirectionRetryHandler.java index 377cfc3f11..80dcbfa849 100644 --- a/aws/s3/core/src/main/java/org/jclouds/aws/s3/handlers/AWSRedirectionRetryHandler.java +++ b/aws/s3/core/src/main/java/org/jclouds/aws/s3/handlers/AWSRedirectionRetryHandler.java @@ -37,8 +37,8 @@ import org.jclouds.http.handlers.BackoffLimitedRetryHandler; import org.jclouds.http.handlers.RedirectionRetryHandler; import org.jclouds.util.Utils; -import com.google.inject.Inject; -import com.google.inject.name.Named; +import javax.inject.Inject; +import javax.inject.Named; /** * Handles Retryable responses with error codes in the 3xx range diff --git a/aws/s3/core/src/main/java/org/jclouds/aws/s3/handlers/ParseAWSErrorFromXmlContent.java b/aws/s3/core/src/main/java/org/jclouds/aws/s3/handlers/ParseAWSErrorFromXmlContent.java index e64aa59188..e61d898fcc 100644 --- a/aws/s3/core/src/main/java/org/jclouds/aws/s3/handlers/ParseAWSErrorFromXmlContent.java +++ b/aws/s3/core/src/main/java/org/jclouds/aws/s3/handlers/ParseAWSErrorFromXmlContent.java @@ -36,7 +36,7 @@ import org.jclouds.http.HttpResponseException; import org.jclouds.logging.Logger; import org.jclouds.util.Utils; -import com.google.inject.Inject; +import javax.inject.Inject; /** * This will parse and set an appropriate exception on the command object. diff --git a/aws/s3/core/src/main/java/org/jclouds/aws/s3/internal/GuiceS3Context.java b/aws/s3/core/src/main/java/org/jclouds/aws/s3/internal/GuiceS3Context.java index 9607109658..a24db5dcee 100644 --- a/aws/s3/core/src/main/java/org/jclouds/aws/s3/internal/GuiceS3Context.java +++ b/aws/s3/core/src/main/java/org/jclouds/aws/s3/internal/GuiceS3Context.java @@ -38,9 +38,9 @@ import org.jclouds.blobstore.InputStreamMap; import org.jclouds.lifecycle.Closer; import org.jclouds.logging.Logger; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.Injector; -import com.google.inject.name.Named; +import javax.inject.Named; /** * Uses a Guice Injector to configure the objects served by S3Context methods. diff --git a/aws/s3/core/src/main/java/org/jclouds/aws/s3/internal/LiveS3InputStreamMap.java b/aws/s3/core/src/main/java/org/jclouds/aws/s3/internal/LiveS3InputStreamMap.java index c35f04074f..c85191daf3 100644 --- a/aws/s3/core/src/main/java/org/jclouds/aws/s3/internal/LiveS3InputStreamMap.java +++ b/aws/s3/core/src/main/java/org/jclouds/aws/s3/internal/LiveS3InputStreamMap.java @@ -29,7 +29,7 @@ import org.jclouds.aws.s3.domain.ObjectMetadata; import org.jclouds.aws.s3.domain.S3Object; import org.jclouds.blobstore.LiveInputStreamMap; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.assistedinject.Assisted; /** diff --git a/aws/s3/core/src/main/java/org/jclouds/aws/s3/internal/LiveS3ObjectMap.java b/aws/s3/core/src/main/java/org/jclouds/aws/s3/internal/LiveS3ObjectMap.java index c9df3a4253..abf873b500 100644 --- a/aws/s3/core/src/main/java/org/jclouds/aws/s3/internal/LiveS3ObjectMap.java +++ b/aws/s3/core/src/main/java/org/jclouds/aws/s3/internal/LiveS3ObjectMap.java @@ -29,7 +29,7 @@ import org.jclouds.aws.s3.domain.ObjectMetadata; import org.jclouds.aws.s3.domain.S3Object; import org.jclouds.blobstore.LiveBlobMap; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.assistedinject.Assisted; /** diff --git a/aws/s3/core/src/main/java/org/jclouds/aws/s3/options/CopyObjectOptions.java b/aws/s3/core/src/main/java/org/jclouds/aws/s3/options/CopyObjectOptions.java index ac8c2605a3..d7c22b0fd3 100644 --- a/aws/s3/core/src/main/java/org/jclouds/aws/s3/options/CopyObjectOptions.java +++ b/aws/s3/core/src/main/java/org/jclouds/aws/s3/options/CopyObjectOptions.java @@ -39,8 +39,8 @@ import org.joda.time.DateTime; import com.google.common.base.Preconditions; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; -import com.google.inject.Inject; -import com.google.inject.name.Named; +import javax.inject.Inject; +import javax.inject.Named; /** * Contains options supported in the REST API for the COPY object operation. diff --git a/aws/s3/core/src/main/java/org/jclouds/aws/s3/reference/S3Constants.java b/aws/s3/core/src/main/java/org/jclouds/aws/s3/reference/S3Constants.java index 6d2dd1ed7e..ec9db5505a 100644 --- a/aws/s3/core/src/main/java/org/jclouds/aws/s3/reference/S3Constants.java +++ b/aws/s3/core/src/main/java/org/jclouds/aws/s3/reference/S3Constants.java @@ -34,7 +34,7 @@ import org.jclouds.blobstore.reference.BlobStoreConstants; public interface S3Constants extends AWSConstants, S3Headers, BlobStoreConstants { /** - * S3 service's XML Namespace, as used in XML request and response documents. + * S3 service's XML Jsr330pace, as used in XML request and response documents. */ public static final String S3_REST_API_XML_NAMESPACE = "http://s3.amazonaws.com/doc/2006-03-01/"; public static final String ENDPOINT = "Endpoint"; diff --git a/aws/s3/core/src/main/java/org/jclouds/aws/s3/util/S3Utils.java b/aws/s3/core/src/main/java/org/jclouds/aws/s3/util/S3Utils.java index 46512af7a9..62499f18b5 100644 --- a/aws/s3/core/src/main/java/org/jclouds/aws/s3/util/S3Utils.java +++ b/aws/s3/core/src/main/java/org/jclouds/aws/s3/util/S3Utils.java @@ -39,7 +39,7 @@ import org.jclouds.http.HttpException; import org.jclouds.http.HttpResponse; import org.jclouds.http.HttpUtils; -import com.google.inject.Inject; +import javax.inject.Inject; /** * Encryption, Hashing, and IO Utilities needed to sign and verify S3 requests and responses. diff --git a/aws/s3/core/src/main/java/org/jclouds/aws/s3/xml/CopyObjectHandler.java b/aws/s3/core/src/main/java/org/jclouds/aws/s3/xml/CopyObjectHandler.java index 585411a801..7d1f711dff 100644 --- a/aws/s3/core/src/main/java/org/jclouds/aws/s3/xml/CopyObjectHandler.java +++ b/aws/s3/core/src/main/java/org/jclouds/aws/s3/xml/CopyObjectHandler.java @@ -28,7 +28,7 @@ import org.jclouds.http.HttpUtils; import org.jclouds.http.functions.ParseSax; import org.jclouds.util.DateService; -import com.google.inject.Inject; +import javax.inject.Inject; /** * Parses the response from Amazon S3 COPY Object command. diff --git a/aws/s3/core/src/main/java/org/jclouds/aws/s3/xml/ListAllMyBucketsHandler.java b/aws/s3/core/src/main/java/org/jclouds/aws/s3/xml/ListAllMyBucketsHandler.java index 28023658b8..67d60ad403 100644 --- a/aws/s3/core/src/main/java/org/jclouds/aws/s3/xml/ListAllMyBucketsHandler.java +++ b/aws/s3/core/src/main/java/org/jclouds/aws/s3/xml/ListAllMyBucketsHandler.java @@ -31,7 +31,7 @@ import org.jclouds.aws.s3.domain.BucketMetadata; import org.jclouds.http.functions.ParseSax; import org.jclouds.util.DateService; -import com.google.inject.Inject; +import javax.inject.Inject; /** * Parses the following XML document: diff --git a/aws/s3/core/src/main/java/org/jclouds/aws/s3/xml/ListBucketHandler.java b/aws/s3/core/src/main/java/org/jclouds/aws/s3/xml/ListBucketHandler.java index 756250e637..5e0d5f229f 100644 --- a/aws/s3/core/src/main/java/org/jclouds/aws/s3/xml/ListBucketHandler.java +++ b/aws/s3/core/src/main/java/org/jclouds/aws/s3/xml/ListBucketHandler.java @@ -37,7 +37,7 @@ import org.jclouds.util.DateService; import org.xml.sax.Attributes; import com.google.common.collect.Lists; -import com.google.inject.Inject; +import javax.inject.Inject; /** * Parses the following XML document: diff --git a/aws/s3/core/src/main/java/org/jclouds/aws/s3/xml/S3ParserFactory.java b/aws/s3/core/src/main/java/org/jclouds/aws/s3/xml/S3ParserFactory.java index 66ccff09a0..92ac80b5b0 100644 --- a/aws/s3/core/src/main/java/org/jclouds/aws/s3/xml/S3ParserFactory.java +++ b/aws/s3/core/src/main/java/org/jclouds/aws/s3/xml/S3ParserFactory.java @@ -34,8 +34,8 @@ import org.jclouds.aws.xml.ErrorHandler; import org.jclouds.http.functions.ParseSax; import com.google.common.annotations.VisibleForTesting; -import com.google.inject.Inject; -import com.google.inject.Provider; +import javax.inject.Inject; +import javax.inject.Provider; /** * Creates Parsers needed to interpret S3 Server messages. This class uses guice assisted inject, diff --git a/aws/s3/core/src/test/java/org/jclouds/aws/s3/config/S3ContextModuleTest.java b/aws/s3/core/src/test/java/org/jclouds/aws/s3/config/S3ContextModuleTest.java index 4a84944974..be091d6ad3 100644 --- a/aws/s3/core/src/test/java/org/jclouds/aws/s3/config/S3ContextModuleTest.java +++ b/aws/s3/core/src/test/java/org/jclouds/aws/s3/config/S3ContextModuleTest.java @@ -39,7 +39,7 @@ import org.testng.annotations.Test; import com.google.inject.Guice; import com.google.inject.Injector; -import com.google.inject.name.Names; +import org.jclouds.util.Jsr330; /** * @author Adrian Cole @@ -52,17 +52,17 @@ public class S3ContextModuleTest { new WithinThreadExecutorService()), new S3ParserModule(), new S3ContextModule() { @Override protected void configure() { - bindConstant().annotatedWith(Names.named(S3Constants.PROPERTY_AWS_ACCESSKEYID)).to( + bindConstant().annotatedWith(Jsr330.named(S3Constants.PROPERTY_AWS_ACCESSKEYID)).to( "localhost"); - bindConstant().annotatedWith(Names.named(S3Constants.PROPERTY_AWS_SECRETACCESSKEY)).to( + bindConstant().annotatedWith(Jsr330.named(S3Constants.PROPERTY_AWS_SECRETACCESSKEY)).to( "localhost"); - bindConstant().annotatedWith(Names.named(S3Constants.PROPERTY_HTTP_ADDRESS)).to( + bindConstant().annotatedWith(Jsr330.named(S3Constants.PROPERTY_HTTP_ADDRESS)).to( "localhost"); - bindConstant().annotatedWith(Names.named(S3Constants.PROPERTY_HTTP_PORT)).to("1000"); - bindConstant().annotatedWith(Names.named(S3Constants.PROPERTY_HTTP_SECURE)).to("false"); - bindConstant().annotatedWith(Names.named(S3Constants.PROPERTY_HTTP_MAX_RETRIES)) + bindConstant().annotatedWith(Jsr330.named(S3Constants.PROPERTY_HTTP_PORT)).to("1000"); + bindConstant().annotatedWith(Jsr330.named(S3Constants.PROPERTY_HTTP_SECURE)).to("false"); + bindConstant().annotatedWith(Jsr330.named(S3Constants.PROPERTY_HTTP_MAX_RETRIES)) .to("5"); - bindConstant().annotatedWith(Names.named(S3Constants.PROPERTY_HTTP_MAX_REDIRECTS)).to( + bindConstant().annotatedWith(Jsr330.named(S3Constants.PROPERTY_HTTP_MAX_REDIRECTS)).to( "5"); super.configure(); } diff --git a/aws/s3/core/src/test/java/org/jclouds/aws/s3/filters/RequestAuthorizeSignatureTest.java b/aws/s3/core/src/test/java/org/jclouds/aws/s3/filters/RequestAuthorizeSignatureTest.java index 6bafc536fc..5993da8516 100644 --- a/aws/s3/core/src/test/java/org/jclouds/aws/s3/filters/RequestAuthorizeSignatureTest.java +++ b/aws/s3/core/src/test/java/org/jclouds/aws/s3/filters/RequestAuthorizeSignatureTest.java @@ -40,7 +40,7 @@ import org.testng.annotations.Test; import com.google.inject.AbstractModule; import com.google.inject.Guice; import com.google.inject.Injector; -import com.google.inject.name.Names; +import org.jclouds.util.Jsr330; @Test(groups = "unit", testName = "s3.RequestAuthorizeSignatureTest") public class RequestAuthorizeSignatureTest { @@ -152,9 +152,9 @@ public class RequestAuthorizeSignatureTest { injector = Guice.createInjector(new AbstractModule() { protected void configure() { - bindConstant().annotatedWith(Names.named(S3Constants.PROPERTY_AWS_ACCESSKEYID)).to( + bindConstant().annotatedWith(Jsr330.named(S3Constants.PROPERTY_AWS_ACCESSKEYID)).to( "foo"); - bindConstant().annotatedWith(Names.named(S3Constants.PROPERTY_AWS_SECRETACCESSKEY)).to( + bindConstant().annotatedWith(Jsr330.named(S3Constants.PROPERTY_AWS_SECRETACCESSKEY)).to( "bar"); bind(DateService.class); diff --git a/aws/s3/perftest/src/test/java/org/jclouds/aws/s3/BasePerformanceLiveTest.java b/aws/s3/perftest/src/test/java/org/jclouds/aws/s3/BasePerformanceLiveTest.java index d0e8360994..e511efbcd7 100755 --- a/aws/s3/perftest/src/test/java/org/jclouds/aws/s3/BasePerformanceLiveTest.java +++ b/aws/s3/perftest/src/test/java/org/jclouds/aws/s3/BasePerformanceLiveTest.java @@ -47,7 +47,7 @@ import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import com.google.inject.Provider; +import javax.inject.Provider; /** * Tests relative performance of S3 functions. diff --git a/aws/s3/samples/googleappengine/pom.xml b/aws/s3/samples/googleappengine/pom.xml index c4266ba4db..d882bd10af 100644 --- a/aws/s3/samples/googleappengine/pom.xml +++ b/aws/s3/samples/googleappengine/pom.xml @@ -54,7 +54,7 @@ com.google.code.guice guice-servlet - 2.0 + 2.1-r1089 displaytag diff --git a/aws/s3/samples/googleappengine/src/main/java/org/jclouds/samples/googleappengine/GetAllBucketsController.java b/aws/s3/samples/googleappengine/src/main/java/org/jclouds/samples/googleappengine/GetAllBucketsController.java index 775f0395f3..1840a5d165 100644 --- a/aws/s3/samples/googleappengine/src/main/java/org/jclouds/samples/googleappengine/GetAllBucketsController.java +++ b/aws/s3/samples/googleappengine/src/main/java/org/jclouds/samples/googleappengine/GetAllBucketsController.java @@ -42,9 +42,9 @@ import org.jclouds.samples.googleappengine.domain.BucketResult; import org.jclouds.samples.googleappengine.functions.MetadataToBucketResult; import com.google.common.collect.Lists; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; +import javax.inject.Inject; +import javax.inject.Provider; +import javax.inject.Singleton; /** * Shows an example of how to use @{link S3Connection} injected with Guice. diff --git a/aws/s3/samples/googleappengine/src/main/java/org/jclouds/samples/googleappengine/JCloudsServlet.java b/aws/s3/samples/googleappengine/src/main/java/org/jclouds/samples/googleappengine/JCloudsServlet.java index cdca94adb9..99260bab24 100644 --- a/aws/s3/samples/googleappengine/src/main/java/org/jclouds/samples/googleappengine/JCloudsServlet.java +++ b/aws/s3/samples/googleappengine/src/main/java/org/jclouds/samples/googleappengine/JCloudsServlet.java @@ -41,8 +41,8 @@ import org.jclouds.aws.s3.domain.ListBucketResponse; import org.jclouds.blobstore.ContainerNotFoundException; import org.jclouds.logging.Logger; -import com.google.inject.Inject; -import com.google.inject.Singleton; +import javax.inject.Inject; +import javax.inject.Singleton; /** * Shows an example of how to use @{link S3Connection} injected with Guice. diff --git a/aws/s3/samples/googleappengine/src/main/java/org/jclouds/samples/googleappengine/config/GuiceServletConfig.java b/aws/s3/samples/googleappengine/src/main/java/org/jclouds/samples/googleappengine/config/GuiceServletConfig.java index a4d6252579..4966d5c919 100644 --- a/aws/s3/samples/googleappengine/src/main/java/org/jclouds/samples/googleappengine/config/GuiceServletConfig.java +++ b/aws/s3/samples/googleappengine/src/main/java/org/jclouds/samples/googleappengine/config/GuiceServletConfig.java @@ -23,7 +23,7 @@ */ package org.jclouds.samples.googleappengine.config; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.Injector; import com.google.inject.servlet.GuiceServletContextListener; import com.google.inject.servlet.ServletModule; diff --git a/aws/s3/samples/googleappengine/src/main/java/org/jclouds/samples/googleappengine/functions/MetadataToBucketResult.java b/aws/s3/samples/googleappengine/src/main/java/org/jclouds/samples/googleappengine/functions/MetadataToBucketResult.java index d0ba37538d..877715f344 100644 --- a/aws/s3/samples/googleappengine/src/main/java/org/jclouds/samples/googleappengine/functions/MetadataToBucketResult.java +++ b/aws/s3/samples/googleappengine/src/main/java/org/jclouds/samples/googleappengine/functions/MetadataToBucketResult.java @@ -35,7 +35,7 @@ import org.jclouds.logging.Logger; import org.jclouds.samples.googleappengine.domain.BucketResult; import com.google.common.base.Function; -import com.google.inject.Inject; +import javax.inject.Inject; public class MetadataToBucketResult implements Function { private final S3BlobStore connection; diff --git a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/binders/BlobBinder.java b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/binders/BlobBinder.java index 9e7d01d312..b89450d11e 100644 --- a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/binders/BlobBinder.java +++ b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/binders/BlobBinder.java @@ -32,8 +32,8 @@ import org.jclouds.azure.storage.blob.domain.BlobMetadata; import org.jclouds.blobstore.domain.Blob; import org.jclouds.http.HttpRequest; -import com.google.inject.Inject; -import com.google.inject.name.Named; +import javax.inject.Inject; +import javax.inject.Named; public class BlobBinder extends org.jclouds.blobstore.binders.BlobBinder { @Inject diff --git a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/config/RestAzureBlobStoreModule.java b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/config/RestAzureBlobStoreModule.java index 1f76217cb8..cd3fc4c24c 100644 --- a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/config/RestAzureBlobStoreModule.java +++ b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/config/RestAzureBlobStoreModule.java @@ -32,7 +32,7 @@ import org.jclouds.http.RequiresHttp; import org.jclouds.rest.RestClientFactory; import com.google.inject.Provides; -import com.google.inject.Singleton; +import javax.inject.Singleton; /** * Configures the Azure Blob Service connection, including logging and http transport. diff --git a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/domain/Blob.java b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/domain/Blob.java index 100b516ac7..76f796e5d9 100644 --- a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/domain/Blob.java +++ b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/domain/Blob.java @@ -23,7 +23,7 @@ */ package org.jclouds.azure.storage.blob.domain; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.assistedinject.Assisted; /** diff --git a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/functions/ParseBlobFromHeadersAndHttpContent.java b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/functions/ParseBlobFromHeadersAndHttpContent.java index 8a3575aeef..2704584e06 100644 --- a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/functions/ParseBlobFromHeadersAndHttpContent.java +++ b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/functions/ParseBlobFromHeadersAndHttpContent.java @@ -27,7 +27,7 @@ import org.jclouds.azure.storage.blob.domain.Blob; import org.jclouds.azure.storage.blob.domain.BlobMetadata; import org.jclouds.blobstore.functions.ParseBlobMetadataFromHeaders; -import com.google.inject.Inject; +import javax.inject.Inject; /** * Parses response headers and creates a new Azure Blob from them and the HTTP content. diff --git a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/functions/ParseBlobMetadataFromHeaders.java b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/functions/ParseBlobMetadataFromHeaders.java index 19c40d5a64..c170edd0cb 100644 --- a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/functions/ParseBlobMetadataFromHeaders.java +++ b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/functions/ParseBlobMetadataFromHeaders.java @@ -31,8 +31,8 @@ import org.jclouds.azure.storage.blob.domain.BlobMetadata; import org.jclouds.http.HttpResponse; import org.jclouds.util.DateService; -import com.google.inject.Inject; -import com.google.inject.name.Named; +import javax.inject.Inject; +import javax.inject.Named; /** * This parses @{link {@link org.jclouds.azure.storage.blob.domain.BlobMetadata} from HTTP headers. diff --git a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/internal/GuiceAzureBlobContext.java b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/internal/GuiceAzureBlobContext.java index 4858827114..ddea23a275 100644 --- a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/internal/GuiceAzureBlobContext.java +++ b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/internal/GuiceAzureBlobContext.java @@ -38,9 +38,9 @@ import org.jclouds.blobstore.InputStreamMap; import org.jclouds.lifecycle.Closer; import org.jclouds.logging.Logger; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.Injector; -import com.google.inject.name.Named; +import javax.inject.Named; /** * Uses a Guice Injector to configure the objects served by AzureBlobContext methods. diff --git a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/internal/LiveAzureBlobInputStreamMap.java b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/internal/LiveAzureBlobInputStreamMap.java index fe14e37881..2e62eddbcc 100644 --- a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/internal/LiveAzureBlobInputStreamMap.java +++ b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/internal/LiveAzureBlobInputStreamMap.java @@ -29,7 +29,7 @@ import org.jclouds.azure.storage.blob.domain.BlobMetadata; import org.jclouds.azure.storage.blob.domain.ContainerMetadata; import org.jclouds.blobstore.LiveInputStreamMap; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.assistedinject.Assisted; /** diff --git a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/internal/LiveAzureBlobObjectMap.java b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/internal/LiveAzureBlobObjectMap.java index cc58957408..f34939a6bf 100644 --- a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/internal/LiveAzureBlobObjectMap.java +++ b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/internal/LiveAzureBlobObjectMap.java @@ -29,7 +29,7 @@ import org.jclouds.azure.storage.blob.domain.BlobMetadata; import org.jclouds.azure.storage.blob.domain.ContainerMetadata; import org.jclouds.blobstore.LiveBlobMap; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.assistedinject.Assisted; /** diff --git a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/xml/AccountNameEnumerationResultsHandler.java b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/xml/AccountNameEnumerationResultsHandler.java index ad1c3c64e6..8e7ae19fb1 100755 --- a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/xml/AccountNameEnumerationResultsHandler.java +++ b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/xml/AccountNameEnumerationResultsHandler.java @@ -35,7 +35,7 @@ import org.jclouds.http.functions.ParseSax; import org.jclouds.util.DateService; import org.joda.time.DateTime; -import com.google.inject.Inject; +import javax.inject.Inject; /** * Parses the following XML document: diff --git a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/xml/AzureBlobParserFactory.java b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/xml/AzureBlobParserFactory.java index 65107877d2..76d1e2d64e 100644 --- a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/xml/AzureBlobParserFactory.java +++ b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/xml/AzureBlobParserFactory.java @@ -29,8 +29,8 @@ import org.jclouds.azure.storage.domain.BoundedList; import org.jclouds.azure.storage.xml.AzureStorageParserFactory; import org.jclouds.http.functions.ParseSax; -import com.google.inject.Inject; -import com.google.inject.Provider; +import javax.inject.Inject; +import javax.inject.Provider; /** * Creates Parsers needed to interpret Azure Blob Service messages. This class uses guice assisted diff --git a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/xml/ContainerNameEnumerationResultsHandler.java b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/xml/ContainerNameEnumerationResultsHandler.java index aaa283eeaf..2561abeb30 100644 --- a/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/xml/ContainerNameEnumerationResultsHandler.java +++ b/azure/storage/blob/core/src/main/java/org/jclouds/azure/storage/blob/xml/ContainerNameEnumerationResultsHandler.java @@ -37,7 +37,7 @@ import org.joda.time.DateTime; import org.xml.sax.Attributes; import org.xml.sax.SAXException; -import com.google.inject.Inject; +import javax.inject.Inject; /** * Parses the following XML document: diff --git a/azure/storage/blob/core/src/test/java/org/jclouds/azure/storage/blob/AzureBlobStoreTest.java b/azure/storage/blob/core/src/test/java/org/jclouds/azure/storage/blob/AzureBlobStoreTest.java index 8e2289b01f..8a79120487 100644 --- a/azure/storage/blob/core/src/test/java/org/jclouds/azure/storage/blob/AzureBlobStoreTest.java +++ b/azure/storage/blob/core/src/test/java/org/jclouds/azure/storage/blob/AzureBlobStoreTest.java @@ -55,7 +55,7 @@ import org.testng.annotations.Test; import com.google.common.collect.ImmutableMultimap; import com.google.inject.AbstractModule; import com.google.inject.Guice; -import com.google.inject.name.Names; +import org.jclouds.util.Jsr330; /** * Tests behavior of {@code AzureBlobStore} @@ -264,10 +264,10 @@ public class AzureBlobStoreTest { protected void configure() { bind(URI.class).toInstance(URI.create("http://blob.core.windows.net")); bindConstant().annotatedWith( - Names.named(AzureStorageConstants.PROPERTY_AZURESTORAGE_ACCOUNT)).to( + Jsr330.named(AzureStorageConstants.PROPERTY_AZURESTORAGE_ACCOUNT)).to( "myaccount"); bindConstant().annotatedWith( - Names.named(AzureStorageConstants.PROPERTY_AZURESTORAGE_KEY)).to( + Jsr330.named(AzureStorageConstants.PROPERTY_AZURESTORAGE_KEY)).to( HttpUtils.toBase64String("key".getBytes())); } diff --git a/azure/storage/core/src/main/java/org/jclouds/azure/storage/config/RestAzureStorageConnectionModule.java b/azure/storage/core/src/main/java/org/jclouds/azure/storage/config/RestAzureStorageConnectionModule.java index c067794095..b77d0cec9c 100644 --- a/azure/storage/core/src/main/java/org/jclouds/azure/storage/config/RestAzureStorageConnectionModule.java +++ b/azure/storage/core/src/main/java/org/jclouds/azure/storage/config/RestAzureStorageConnectionModule.java @@ -41,11 +41,11 @@ import org.jclouds.logging.Logger; import org.jclouds.rest.config.JaxrsModule; import com.google.inject.AbstractModule; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.Provides; import com.google.inject.Scopes; -import com.google.inject.Singleton; -import com.google.inject.name.Named; +import javax.inject.Singleton; +import javax.inject.Named; /** * Configures the AzureStorage connection, including logging and http transport. diff --git a/azure/storage/core/src/main/java/org/jclouds/azure/storage/filters/SharedKeyAuthentication.java b/azure/storage/core/src/main/java/org/jclouds/azure/storage/filters/SharedKeyAuthentication.java index 437e1e3400..a4703a0f6a 100644 --- a/azure/storage/core/src/main/java/org/jclouds/azure/storage/filters/SharedKeyAuthentication.java +++ b/azure/storage/core/src/main/java/org/jclouds/azure/storage/filters/SharedKeyAuthentication.java @@ -40,9 +40,9 @@ import org.jclouds.http.HttpUtils; import org.jclouds.util.DateService; import com.google.common.annotations.VisibleForTesting; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.inject.name.Named; +import javax.inject.Inject; +import javax.inject.Singleton; +import javax.inject.Named; /** * Signs the Azure Storage request. This will update timestamps at most once per second. diff --git a/azure/storage/core/src/main/java/org/jclouds/azure/storage/handlers/ParseAzureStorageErrorFromXmlContent.java b/azure/storage/core/src/main/java/org/jclouds/azure/storage/handlers/ParseAzureStorageErrorFromXmlContent.java index c66c94a75c..001710614c 100644 --- a/azure/storage/core/src/main/java/org/jclouds/azure/storage/handlers/ParseAzureStorageErrorFromXmlContent.java +++ b/azure/storage/core/src/main/java/org/jclouds/azure/storage/handlers/ParseAzureStorageErrorFromXmlContent.java @@ -36,7 +36,7 @@ import org.jclouds.http.HttpResponseException; import org.jclouds.logging.Logger; import org.jclouds.util.Utils; -import com.google.inject.Inject; +import javax.inject.Inject; /** * This will parse and set an appropriate exception on the command object. diff --git a/azure/storage/core/src/main/java/org/jclouds/azure/storage/util/AzureStorageUtils.java b/azure/storage/core/src/main/java/org/jclouds/azure/storage/util/AzureStorageUtils.java index f6f1c1057e..ce1eb501d4 100644 --- a/azure/storage/core/src/main/java/org/jclouds/azure/storage/util/AzureStorageUtils.java +++ b/azure/storage/core/src/main/java/org/jclouds/azure/storage/util/AzureStorageUtils.java @@ -34,7 +34,7 @@ import org.jclouds.http.HttpCommand; import org.jclouds.http.HttpException; import org.jclouds.http.HttpResponse; -import com.google.inject.Inject; +import javax.inject.Inject; /** * Encryption, Hashing, and IO Utilities needed to sign and verify Azure Storage requests and diff --git a/azure/storage/core/src/main/java/org/jclouds/azure/storage/xml/AzureStorageParserFactory.java b/azure/storage/core/src/main/java/org/jclouds/azure/storage/xml/AzureStorageParserFactory.java index f8aac51249..6c9a11660b 100644 --- a/azure/storage/core/src/main/java/org/jclouds/azure/storage/xml/AzureStorageParserFactory.java +++ b/azure/storage/core/src/main/java/org/jclouds/azure/storage/xml/AzureStorageParserFactory.java @@ -27,8 +27,8 @@ import org.jclouds.azure.storage.domain.AzureStorageError; import org.jclouds.http.functions.ParseSax; import com.google.common.annotations.VisibleForTesting; -import com.google.inject.Inject; -import com.google.inject.Provider; +import javax.inject.Inject; +import javax.inject.Provider; /** * Creates Parsers needed to interpret Azure Storage Service messages. This class uses guice diff --git a/azure/storage/core/src/test/java/org/jclouds/azure/storage/filters/SharedKeyAuthenticationLiveTest.java b/azure/storage/core/src/test/java/org/jclouds/azure/storage/filters/SharedKeyAuthenticationLiveTest.java index 3f658b42d0..72f1362a14 100644 --- a/azure/storage/core/src/test/java/org/jclouds/azure/storage/filters/SharedKeyAuthenticationLiveTest.java +++ b/azure/storage/core/src/test/java/org/jclouds/azure/storage/filters/SharedKeyAuthenticationLiveTest.java @@ -45,7 +45,7 @@ import org.testng.annotations.Test; import com.google.inject.AbstractModule; import com.google.inject.Guice; import com.google.inject.Injector; -import com.google.inject.name.Names; +import org.jclouds.util.Jsr330; /** * Tests behavior of {@code JaxrsAnnotationProcessor} @@ -85,9 +85,9 @@ public class SharedKeyAuthenticationLiveTest { @Override protected void configure() { bindConstant().annotatedWith( - Names.named(AzureStorageConstants.PROPERTY_AZURESTORAGE_ACCOUNT)).to(account); + Jsr330.named(AzureStorageConstants.PROPERTY_AZURESTORAGE_ACCOUNT)).to(account); bindConstant().annotatedWith( - Names.named(AzureStorageConstants.PROPERTY_AZURESTORAGE_KEY)).to(key); + Jsr330.named(AzureStorageConstants.PROPERTY_AZURESTORAGE_KEY)).to(key); } }, new JaxrsModule(), new Log4JLoggingModule(), new ExecutorServiceModule( diff --git a/azure/storage/core/src/test/java/org/jclouds/azure/storage/filters/SharedKeyAuthenticationTest.java b/azure/storage/core/src/test/java/org/jclouds/azure/storage/filters/SharedKeyAuthenticationTest.java index 55fad27b13..cb07977f77 100755 --- a/azure/storage/core/src/test/java/org/jclouds/azure/storage/filters/SharedKeyAuthenticationTest.java +++ b/azure/storage/core/src/test/java/org/jclouds/azure/storage/filters/SharedKeyAuthenticationTest.java @@ -41,7 +41,7 @@ import org.testng.annotations.Test; import com.google.inject.AbstractModule; import com.google.inject.Guice; import com.google.inject.Injector; -import com.google.inject.name.Names; +import org.jclouds.util.Jsr330; @Test(groups = "unit", testName = "azurestorage.SharedKeyAuthenticationTest") public class SharedKeyAuthenticationTest { @@ -148,9 +148,9 @@ public class SharedKeyAuthenticationTest { protected void configure() { bindConstant().annotatedWith( - Names.named(AzureStorageConstants.PROPERTY_AZURESTORAGE_ACCOUNT)).to(ACCOUNT); + Jsr330.named(AzureStorageConstants.PROPERTY_AZURESTORAGE_ACCOUNT)).to(ACCOUNT); bindConstant().annotatedWith( - Names.named(AzureStorageConstants.PROPERTY_AZURESTORAGE_KEY)).to(KEY); + Jsr330.named(AzureStorageConstants.PROPERTY_AZURESTORAGE_KEY)).to(KEY); bind(DateService.class); } diff --git a/azure/storage/queue/core/src/main/java/org/jclouds/azure/storage/queue/config/RestAzureQueueConnectionModule.java b/azure/storage/queue/core/src/main/java/org/jclouds/azure/storage/queue/config/RestAzureQueueConnectionModule.java index 0d248670a2..f980106081 100644 --- a/azure/storage/queue/core/src/main/java/org/jclouds/azure/storage/queue/config/RestAzureQueueConnectionModule.java +++ b/azure/storage/queue/core/src/main/java/org/jclouds/azure/storage/queue/config/RestAzureQueueConnectionModule.java @@ -32,7 +32,7 @@ import org.jclouds.http.RequiresHttp; import org.jclouds.rest.RestClientFactory; import com.google.inject.Provides; -import com.google.inject.Singleton; +import javax.inject.Singleton; /** * Configures the Azure Queue Service connection, including logging and http transport. diff --git a/azure/storage/queue/core/src/main/java/org/jclouds/azure/storage/queue/internal/GuiceAzureQueueContext.java b/azure/storage/queue/core/src/main/java/org/jclouds/azure/storage/queue/internal/GuiceAzureQueueContext.java index 42eac8b4ea..4b8745828e 100644 --- a/azure/storage/queue/core/src/main/java/org/jclouds/azure/storage/queue/internal/GuiceAzureQueueContext.java +++ b/azure/storage/queue/core/src/main/java/org/jclouds/azure/storage/queue/internal/GuiceAzureQueueContext.java @@ -34,9 +34,9 @@ import org.jclouds.azure.storage.reference.AzureStorageConstants; import org.jclouds.lifecycle.Closer; import org.jclouds.logging.Logger; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.Injector; -import com.google.inject.name.Named; +import javax.inject.Named; /** * Uses a Guice Injector to configure the objects served by AzureQueueContext methods. diff --git a/azure/storage/queue/core/src/main/java/org/jclouds/azure/storage/queue/xml/AccountNameEnumerationResultsHandler.java b/azure/storage/queue/core/src/main/java/org/jclouds/azure/storage/queue/xml/AccountNameEnumerationResultsHandler.java index c2a02d46ea..546668013b 100755 --- a/azure/storage/queue/core/src/main/java/org/jclouds/azure/storage/queue/xml/AccountNameEnumerationResultsHandler.java +++ b/azure/storage/queue/core/src/main/java/org/jclouds/azure/storage/queue/xml/AccountNameEnumerationResultsHandler.java @@ -32,7 +32,7 @@ import org.jclouds.azure.storage.domain.BoundedList; import org.jclouds.azure.storage.queue.domain.QueueMetadata; import org.jclouds.http.functions.ParseSax; -import com.google.inject.Inject; +import javax.inject.Inject; /** * Parses the following XML document: diff --git a/azure/storage/queue/core/src/main/java/org/jclouds/azure/storage/queue/xml/AzureQueueParserFactory.java b/azure/storage/queue/core/src/main/java/org/jclouds/azure/storage/queue/xml/AzureQueueParserFactory.java index 5b5fd1078e..93b5853291 100644 --- a/azure/storage/queue/core/src/main/java/org/jclouds/azure/storage/queue/xml/AzureQueueParserFactory.java +++ b/azure/storage/queue/core/src/main/java/org/jclouds/azure/storage/queue/xml/AzureQueueParserFactory.java @@ -28,8 +28,8 @@ import org.jclouds.azure.storage.queue.domain.QueueMetadata; import org.jclouds.azure.storage.xml.AzureStorageParserFactory; import org.jclouds.http.functions.ParseSax; -import com.google.inject.Inject; -import com.google.inject.Provider; +import javax.inject.Inject; +import javax.inject.Provider; /** * Creates Parsers needed to interpret Azure Queue Service messages. This class uses guice assisted diff --git a/azure/storage/queue/core/src/test/java/org/jclouds/azure/storage/queue/AzureQueueConnectionTest.java b/azure/storage/queue/core/src/test/java/org/jclouds/azure/storage/queue/AzureQueueConnectionTest.java index b6a553f43c..17b1c148f1 100644 --- a/azure/storage/queue/core/src/test/java/org/jclouds/azure/storage/queue/AzureQueueConnectionTest.java +++ b/azure/storage/queue/core/src/test/java/org/jclouds/azure/storage/queue/AzureQueueConnectionTest.java @@ -52,7 +52,7 @@ import org.testng.annotations.Test; import com.google.common.collect.ImmutableMultimap; import com.google.inject.AbstractModule; import com.google.inject.Guice; -import com.google.inject.name.Names; +import org.jclouds.util.Jsr330; /** * Tests behavior of {@code AzureQueueConnection} @@ -170,10 +170,10 @@ public class AzureQueueConnectionTest { protected void configure() { bind(URI.class).toInstance(URI.create("http://localhost:8080")); bindConstant().annotatedWith( - Names.named(AzureStorageConstants.PROPERTY_AZURESTORAGE_ACCOUNT)).to( + Jsr330.named(AzureStorageConstants.PROPERTY_AZURESTORAGE_ACCOUNT)).to( "user"); bindConstant().annotatedWith( - Names.named(AzureStorageConstants.PROPERTY_AZURESTORAGE_KEY)).to( + Jsr330.named(AzureStorageConstants.PROPERTY_AZURESTORAGE_KEY)).to( HttpUtils.toBase64String("key".getBytes())); } diff --git a/blobstore/core/src/main/java/org/jclouds/blobstore/BaseBlobMap.java b/blobstore/core/src/main/java/org/jclouds/blobstore/BaseBlobMap.java index 7b8dc75f6a..04613d2d46 100755 --- a/blobstore/core/src/main/java/org/jclouds/blobstore/BaseBlobMap.java +++ b/blobstore/core/src/main/java/org/jclouds/blobstore/BaseBlobMap.java @@ -49,9 +49,9 @@ import org.jclouds.util.Utils; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Maps; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.assistedinject.Assisted; -import com.google.inject.name.Named; +import javax.inject.Named; /** * Implements core Map functionality with an {@link BlobStore} diff --git a/blobstore/core/src/main/java/org/jclouds/blobstore/LiveBlobMap.java b/blobstore/core/src/main/java/org/jclouds/blobstore/LiveBlobMap.java index e374e3fba3..287aaa3bd4 100755 --- a/blobstore/core/src/main/java/org/jclouds/blobstore/LiveBlobMap.java +++ b/blobstore/core/src/main/java/org/jclouds/blobstore/LiveBlobMap.java @@ -37,7 +37,7 @@ import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.blobstore.domain.ContainerMetadata; import org.jclouds.util.Utils; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.assistedinject.Assisted; /** diff --git a/blobstore/core/src/main/java/org/jclouds/blobstore/LiveInputStreamMap.java b/blobstore/core/src/main/java/org/jclouds/blobstore/LiveInputStreamMap.java index 9144b14c0d..998ccdf69c 100755 --- a/blobstore/core/src/main/java/org/jclouds/blobstore/LiveInputStreamMap.java +++ b/blobstore/core/src/main/java/org/jclouds/blobstore/LiveInputStreamMap.java @@ -41,7 +41,7 @@ import org.jclouds.blobstore.domain.ContainerMetadata; import org.jclouds.util.Utils; import com.google.common.annotations.VisibleForTesting; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.assistedinject.Assisted; /** diff --git a/blobstore/core/src/main/java/org/jclouds/blobstore/binders/BlobBinder.java b/blobstore/core/src/main/java/org/jclouds/blobstore/binders/BlobBinder.java index 10c3e74058..72e38a0e6e 100644 --- a/blobstore/core/src/main/java/org/jclouds/blobstore/binders/BlobBinder.java +++ b/blobstore/core/src/main/java/org/jclouds/blobstore/binders/BlobBinder.java @@ -33,8 +33,8 @@ import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpUtils; import org.jclouds.rest.EntityBinder; -import com.google.inject.Inject; -import com.google.inject.name.Named; +import javax.inject.Inject; +import javax.inject.Named; public class BlobBinder implements EntityBinder { private final String metadataPrefix; diff --git a/blobstore/core/src/main/java/org/jclouds/blobstore/binders/UserMetadataBinder.java b/blobstore/core/src/main/java/org/jclouds/blobstore/binders/UserMetadataBinder.java index 842d479d3f..8b657f37bd 100644 --- a/blobstore/core/src/main/java/org/jclouds/blobstore/binders/UserMetadataBinder.java +++ b/blobstore/core/src/main/java/org/jclouds/blobstore/binders/UserMetadataBinder.java @@ -31,8 +31,8 @@ import org.jclouds.http.HttpRequest; import org.jclouds.rest.EntityBinder; import com.google.common.collect.Multimap; -import com.google.inject.Inject; -import com.google.inject.name.Named; +import javax.inject.Inject; +import javax.inject.Named; public class UserMetadataBinder implements EntityBinder { private final String metadataPrefix; diff --git a/blobstore/core/src/main/java/org/jclouds/blobstore/domain/Blob.java b/blobstore/core/src/main/java/org/jclouds/blobstore/domain/Blob.java index 8a643bac4d..283920b528 100644 --- a/blobstore/core/src/main/java/org/jclouds/blobstore/domain/Blob.java +++ b/blobstore/core/src/main/java/org/jclouds/blobstore/domain/Blob.java @@ -33,7 +33,7 @@ import java.io.InputStream; import org.jclouds.http.HttpUtils; import org.jclouds.http.HttpUtils.MD5InputStreamResult; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.assistedinject.Assisted; /** diff --git a/blobstore/core/src/main/java/org/jclouds/blobstore/functions/ParseBlobFromHeadersAndHttpContent.java b/blobstore/core/src/main/java/org/jclouds/blobstore/functions/ParseBlobFromHeadersAndHttpContent.java index 3440f4aa65..310707dc29 100644 --- a/blobstore/core/src/main/java/org/jclouds/blobstore/functions/ParseBlobFromHeadersAndHttpContent.java +++ b/blobstore/core/src/main/java/org/jclouds/blobstore/functions/ParseBlobFromHeadersAndHttpContent.java @@ -32,7 +32,7 @@ import org.jclouds.http.HttpResponse; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Function; -import com.google.inject.Inject; +import javax.inject.Inject; /** * Parses response headers and creates a new Blob from them and the HTTP content. diff --git a/blobstore/core/src/main/java/org/jclouds/blobstore/functions/ParseBlobMetadataFromHeaders.java b/blobstore/core/src/main/java/org/jclouds/blobstore/functions/ParseBlobMetadataFromHeaders.java index 4b0266ddd7..9923aa330b 100755 --- a/blobstore/core/src/main/java/org/jclouds/blobstore/functions/ParseBlobMetadataFromHeaders.java +++ b/blobstore/core/src/main/java/org/jclouds/blobstore/functions/ParseBlobMetadataFromHeaders.java @@ -37,8 +37,8 @@ import org.jclouds.util.DateService; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Function; -import com.google.inject.Inject; -import com.google.inject.name.Named; +import javax.inject.Inject; +import javax.inject.Named; /** * @author Adrian Cole diff --git a/blobstore/core/src/test/java/org/jclouds/blobstore/integration/StubTestInitializer.java b/blobstore/core/src/test/java/org/jclouds/blobstore/integration/StubTestInitializer.java index 6d9567c731..d05a51dd6f 100644 --- a/blobstore/core/src/test/java/org/jclouds/blobstore/integration/StubTestInitializer.java +++ b/blobstore/core/src/test/java/org/jclouds/blobstore/integration/StubTestInitializer.java @@ -50,7 +50,7 @@ import org.jclouds.logging.Logger; import org.testng.ITestContext; import com.google.inject.AbstractModule; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.Injector; import com.google.inject.Key; import com.google.inject.Module; diff --git a/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java b/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java index b7b15bd2a1..c99725ab22 100644 --- a/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java +++ b/blobstore/core/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobStoreIntegrationTest.java @@ -99,7 +99,7 @@ public class BaseBlobStoreIntegrationTest, C extend /** * two test groups integration and live. */ - private volatile static BlockingQueue containerNames = new ArrayBlockingQueue( + private volatile static BlockingQueue containerJsr330 = new ArrayBlockingQueue( containerCount); @BeforeGroups(groups = { "integration", "live" }) @@ -169,7 +169,7 @@ public class BaseBlobStoreIntegrationTest, C extend } else { try { createContainerAndEnsureEmpty(client, context, containerName); - containerNames.put(containerName); + containerJsr330.put(containerName); } catch (Throwable e) { // throw away the container and try again with the next index deleteContainerOrWarnIfUnable(client, context, containerName); @@ -177,8 +177,8 @@ public class BaseBlobStoreIntegrationTest, C extend } } } - testContext.setAttribute("containerNames", containerNames); - System.err.printf("*** containers to test: %s%n", containerNames); + testContext.setAttribute("containerJsr330", containerJsr330); + System.err.printf("*** containers to test: %s%n", containerJsr330); // careful not to keep too many files open context.close(); initialized = true; @@ -338,7 +338,7 @@ public class BaseBlobStoreIntegrationTest, C extend public String getContainerName() throws InterruptedException, ExecutionException, TimeoutException { - String containerName = containerNames.poll(30, TimeUnit.SECONDS); + String containerName = containerJsr330.poll(30, TimeUnit.SECONDS); assert containerName != null : "unable to get a container for the test"; emptyContainer(containerName); return containerName; @@ -357,7 +357,7 @@ public class BaseBlobStoreIntegrationTest, C extend public void returnContainer(final String containerName) throws InterruptedException, ExecutionException, TimeoutException { if (containerName != null) { - containerNames.add(containerName); + containerJsr330.add(containerName); /* * Ensure that any returned container name actually exists on the server. Return of a * non-existent container introduces subtle testing bugs, where later unrelated tests will diff --git a/core/pom.xml b/core/pom.xml index 708e4f6ffb..c619e5145b 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -70,12 +70,17 @@ com.google.code.guice guice - 2.1-r1039 + 2.1-r1089 + + + javax.inject + atinject + 1.0 com.google.code.guice guice-assistedinject - 2.0 + 2.1-r1089 com.google.collections diff --git a/core/src/main/java/org/jclouds/cloud/CloudContextBuilder.java b/core/src/main/java/org/jclouds/cloud/CloudContextBuilder.java index 8b6c63f65a..e92eb27e36 100644 --- a/core/src/main/java/org/jclouds/cloud/CloudContextBuilder.java +++ b/core/src/main/java/org/jclouds/cloud/CloudContextBuilder.java @@ -64,7 +64,7 @@ import com.google.inject.AbstractModule; import com.google.inject.Guice; import com.google.inject.Injector; import com.google.inject.Module; -import com.google.inject.name.Names; +import org.jclouds.util.Jsr330; /** * Creates {@link CloudContext} or {@link Injector} instances based on the most commonly requested @@ -199,7 +199,7 @@ public abstract class CloudContextBuilder> { modules.add(new AbstractModule() { @Override protected void configure() { - Names.bindProperties(binder(), checkNotNull(properties, "properties")); + Jsr330.bindProperties(binder(), checkNotNull(properties, "properties")); } }); addContextModule(modules); diff --git a/core/src/main/java/org/jclouds/http/TransformingHttpCommandExecutorServiceImpl.java b/core/src/main/java/org/jclouds/http/TransformingHttpCommandExecutorServiceImpl.java index f132286d8c..b578282637 100644 --- a/core/src/main/java/org/jclouds/http/TransformingHttpCommandExecutorServiceImpl.java +++ b/core/src/main/java/org/jclouds/http/TransformingHttpCommandExecutorServiceImpl.java @@ -30,7 +30,7 @@ import java.util.concurrent.Future; import org.jclouds.concurrent.FutureFunctionCallable; import com.google.common.base.Function; -import com.google.inject.Inject; +import javax.inject.Inject; /** * Executor which will invoke and transform the response of an {@code EndpointCommand} into generic diff --git a/core/src/main/java/org/jclouds/http/TransformingHttpCommandImpl.java b/core/src/main/java/org/jclouds/http/TransformingHttpCommandImpl.java index af7d3e8e8a..0613680ca9 100644 --- a/core/src/main/java/org/jclouds/http/TransformingHttpCommandImpl.java +++ b/core/src/main/java/org/jclouds/http/TransformingHttpCommandImpl.java @@ -36,7 +36,7 @@ import javax.ws.rs.core.UriBuilder; import org.jclouds.logging.Logger; import com.google.common.base.Function; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.assistedinject.Assisted; import com.google.inject.internal.Nullable; diff --git a/core/src/main/java/org/jclouds/http/annotation/ClientError.java b/core/src/main/java/org/jclouds/http/annotation/ClientError.java index ea258c2d3f..281b2cca21 100644 --- a/core/src/main/java/org/jclouds/http/annotation/ClientError.java +++ b/core/src/main/java/org/jclouds/http/annotation/ClientError.java @@ -23,7 +23,7 @@ */ package org.jclouds.http.annotation; -import com.google.inject.BindingAnnotation; +import javax.inject.Qualifier; import java.lang.annotation.Target; import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -37,7 +37,7 @@ import static java.lang.annotation.ElementType.METHOD; * * @author Adrian Cole */ -@BindingAnnotation +@Qualifier @Target( { FIELD, PARAMETER, METHOD }) @Retention(RUNTIME) public @interface ClientError { diff --git a/core/src/main/java/org/jclouds/http/annotation/Redirection.java b/core/src/main/java/org/jclouds/http/annotation/Redirection.java index 5d07312f2e..b18c6e5ffb 100644 --- a/core/src/main/java/org/jclouds/http/annotation/Redirection.java +++ b/core/src/main/java/org/jclouds/http/annotation/Redirection.java @@ -23,7 +23,7 @@ */ package org.jclouds.http.annotation; -import com.google.inject.BindingAnnotation; +import javax.inject.Qualifier; import java.lang.annotation.Target; import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -37,7 +37,7 @@ import static java.lang.annotation.ElementType.METHOD; * * @author Adrian Cole */ -@BindingAnnotation +@Qualifier @Target( { FIELD, PARAMETER, METHOD }) @Retention(RUNTIME) public @interface Redirection { diff --git a/core/src/main/java/org/jclouds/http/annotation/ServerError.java b/core/src/main/java/org/jclouds/http/annotation/ServerError.java index d519658d1c..999922f074 100644 --- a/core/src/main/java/org/jclouds/http/annotation/ServerError.java +++ b/core/src/main/java/org/jclouds/http/annotation/ServerError.java @@ -23,7 +23,7 @@ */ package org.jclouds.http.annotation; -import com.google.inject.BindingAnnotation; +import javax.inject.Qualifier; import java.lang.annotation.Target; import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -37,7 +37,7 @@ import static java.lang.annotation.ElementType.METHOD; * * @author Adrian Cole */ -@BindingAnnotation +@Qualifier @Target( { FIELD, PARAMETER, METHOD }) @Retention(RUNTIME) public @interface ServerError { diff --git a/core/src/main/java/org/jclouds/http/binders/JsonBinder.java b/core/src/main/java/org/jclouds/http/binders/JsonBinder.java index 9302b747d2..38d1fedb9e 100644 --- a/core/src/main/java/org/jclouds/http/binders/JsonBinder.java +++ b/core/src/main/java/org/jclouds/http/binders/JsonBinder.java @@ -35,7 +35,7 @@ import org.jclouds.http.HttpRequest; import org.jclouds.rest.MapEntityBinder; import com.google.gson.Gson; -import com.google.inject.Inject; +import javax.inject.Inject; /** * Binds the object to the request as a json object. diff --git a/core/src/main/java/org/jclouds/http/functions/ParseJson.java b/core/src/main/java/org/jclouds/http/functions/ParseJson.java index d2502fe170..233b143f16 100644 --- a/core/src/main/java/org/jclouds/http/functions/ParseJson.java +++ b/core/src/main/java/org/jclouds/http/functions/ParseJson.java @@ -36,8 +36,8 @@ import org.jclouds.logging.Logger; import com.google.common.base.Function; import com.google.gson.Gson; -import com.google.inject.Inject; -import com.google.inject.name.Named; +import javax.inject.Inject; +import javax.inject.Named; /** * This object will parse the body of an HttpResponse and return the result of type back to the diff --git a/core/src/main/java/org/jclouds/http/functions/ParseSax.java b/core/src/main/java/org/jclouds/http/functions/ParseSax.java index 3d2ce1ee35..be75b6ed01 100644 --- a/core/src/main/java/org/jclouds/http/functions/ParseSax.java +++ b/core/src/main/java/org/jclouds/http/functions/ParseSax.java @@ -41,9 +41,9 @@ import org.xml.sax.XMLReader; import org.xml.sax.helpers.DefaultHandler; import com.google.common.base.Function; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.assistedinject.Assisted; -import com.google.inject.name.Named; +import javax.inject.Named; /** * This object will parse the body of an HttpResponse and return the result of type back to the diff --git a/core/src/main/java/org/jclouds/http/functions/config/ParserModule.java b/core/src/main/java/org/jclouds/http/functions/config/ParserModule.java index 42759d830e..aaa373a2ca 100755 --- a/core/src/main/java/org/jclouds/http/functions/config/ParserModule.java +++ b/core/src/main/java/org/jclouds/http/functions/config/ParserModule.java @@ -48,7 +48,7 @@ import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; import com.google.inject.AbstractModule; import com.google.inject.Provides; -import com.google.inject.Singleton; +import javax.inject.Singleton; import com.google.inject.TypeLiteral; import com.google.inject.assistedinject.FactoryProvider; diff --git a/core/src/main/java/org/jclouds/http/handlers/BackoffLimitedRetryHandler.java b/core/src/main/java/org/jclouds/http/handlers/BackoffLimitedRetryHandler.java index cee8bc4131..0fbe1f06c7 100644 --- a/core/src/main/java/org/jclouds/http/handlers/BackoffLimitedRetryHandler.java +++ b/core/src/main/java/org/jclouds/http/handlers/BackoffLimitedRetryHandler.java @@ -32,8 +32,8 @@ import org.jclouds.http.HttpRetryHandler; import org.jclouds.http.TransformingHttpCommand; import org.jclouds.logging.Logger; -import com.google.inject.Inject; -import com.google.inject.name.Named; +import javax.inject.Inject; +import javax.inject.Named; /** * Allow replayable request to be retried a limited number of times, and impose an exponential diff --git a/core/src/main/java/org/jclouds/http/handlers/DelegatingErrorHandler.java b/core/src/main/java/org/jclouds/http/handlers/DelegatingErrorHandler.java index 73b92631c9..6accf71479 100644 --- a/core/src/main/java/org/jclouds/http/handlers/DelegatingErrorHandler.java +++ b/core/src/main/java/org/jclouds/http/handlers/DelegatingErrorHandler.java @@ -31,7 +31,7 @@ import org.jclouds.http.annotation.Redirection; import org.jclouds.http.annotation.ServerError; import com.google.common.annotations.VisibleForTesting; -import com.google.inject.Inject; +import javax.inject.Inject; /** * Delegates to {@link HttpErrorHandler HttpErrorHandlers} who are annotated according to the diff --git a/core/src/main/java/org/jclouds/http/handlers/DelegatingRetryHandler.java b/core/src/main/java/org/jclouds/http/handlers/DelegatingRetryHandler.java index ef88b35b86..a4483312be 100644 --- a/core/src/main/java/org/jclouds/http/handlers/DelegatingRetryHandler.java +++ b/core/src/main/java/org/jclouds/http/handlers/DelegatingRetryHandler.java @@ -31,7 +31,7 @@ import org.jclouds.http.annotation.Redirection; import org.jclouds.http.annotation.ServerError; import com.google.common.annotations.VisibleForTesting; -import com.google.inject.Inject; +import javax.inject.Inject; /** * Delegates to {@link HttpRetryHandler HttpRetryHandlers} who are annotated according to the diff --git a/core/src/main/java/org/jclouds/http/handlers/RedirectionRetryHandler.java b/core/src/main/java/org/jclouds/http/handlers/RedirectionRetryHandler.java index 895eb3f811..0d712d578a 100644 --- a/core/src/main/java/org/jclouds/http/handlers/RedirectionRetryHandler.java +++ b/core/src/main/java/org/jclouds/http/handlers/RedirectionRetryHandler.java @@ -38,8 +38,8 @@ import org.jclouds.http.HttpRetryHandler; import org.jclouds.logging.Logger; import com.google.common.annotations.VisibleForTesting; -import com.google.inject.Inject; -import com.google.inject.name.Named; +import javax.inject.Inject; +import javax.inject.Named; /** * Handles Retryable responses with error codes in the 3xx range @@ -52,7 +52,6 @@ public class RedirectionRetryHandler implements HttpRetryHandler { @Resource protected Logger logger = Logger.NULL; - @Inject protected final BackoffLimitedRetryHandler backoffHandler; @Inject diff --git a/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java b/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java index eaafd3bc38..10161cc3e8 100644 --- a/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java +++ b/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java @@ -49,8 +49,8 @@ import org.jclouds.http.handlers.DelegatingErrorHandler; import org.jclouds.http.handlers.DelegatingRetryHandler; import com.google.common.collect.Maps; -import com.google.inject.Inject; -import com.google.inject.name.Named; +import javax.inject.Inject; +import javax.inject.Named; /** * Basic implementation of a {@link HttpCommandExecutorService}. diff --git a/core/src/main/java/org/jclouds/http/pool/ConnectionPoolTransformingHttpCommandExecutorService.java b/core/src/main/java/org/jclouds/http/pool/ConnectionPoolTransformingHttpCommandExecutorService.java index d7929278ca..02081eb62d 100644 --- a/core/src/main/java/org/jclouds/http/pool/ConnectionPoolTransformingHttpCommandExecutorService.java +++ b/core/src/main/java/org/jclouds/http/pool/ConnectionPoolTransformingHttpCommandExecutorService.java @@ -46,7 +46,7 @@ import org.jclouds.util.Utils; import com.google.common.base.Function; import com.google.common.collect.MapMaker; -import com.google.inject.Inject; +import javax.inject.Inject; /** * // TODO: Adrian: Document this! diff --git a/core/src/main/java/org/jclouds/http/pool/HttpCommandConnectionPool.java b/core/src/main/java/org/jclouds/http/pool/HttpCommandConnectionPool.java index 5243b59035..0fb2858b9a 100644 --- a/core/src/main/java/org/jclouds/http/pool/HttpCommandConnectionPool.java +++ b/core/src/main/java/org/jclouds/http/pool/HttpCommandConnectionPool.java @@ -35,7 +35,7 @@ import org.jclouds.http.HttpCommandRendezvous; import org.jclouds.lifecycle.BaseLifeCycle; import com.google.inject.assistedinject.Assisted; -import com.google.inject.name.Named; +import javax.inject.Named; /** * // TODO: Adrian: Document this! diff --git a/core/src/main/java/org/jclouds/http/pool/config/ConnectionPoolCommandExecutorServiceModule.java b/core/src/main/java/org/jclouds/http/pool/config/ConnectionPoolCommandExecutorServiceModule.java index 35555b3130..b8e14bc2b9 100644 --- a/core/src/main/java/org/jclouds/http/pool/config/ConnectionPoolCommandExecutorServiceModule.java +++ b/core/src/main/java/org/jclouds/http/pool/config/ConnectionPoolCommandExecutorServiceModule.java @@ -32,7 +32,7 @@ import org.jclouds.lifecycle.config.LifeCycleModule; import com.google.inject.AbstractModule; import com.google.inject.Provides; -import com.google.inject.name.Named; +import javax.inject.Named; /** * diff --git a/core/src/main/java/org/jclouds/lifecycle/config/LifeCycleModule.java b/core/src/main/java/org/jclouds/lifecycle/config/LifeCycleModule.java index 79d5740a3f..7539118e3f 100644 --- a/core/src/main/java/org/jclouds/lifecycle/config/LifeCycleModule.java +++ b/core/src/main/java/org/jclouds/lifecycle/config/LifeCycleModule.java @@ -40,7 +40,7 @@ import javax.annotation.PreDestroy; import org.jclouds.lifecycle.Closer; import com.google.inject.AbstractModule; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.ProvisionException; import com.google.inject.TypeLiteral; import com.google.inject.spi.InjectionListener; diff --git a/core/src/main/java/org/jclouds/logging/config/BindLoggersAnnotatedWithResource.java b/core/src/main/java/org/jclouds/logging/config/BindLoggersAnnotatedWithResource.java index b20e022a8e..fcb634f99e 100644 --- a/core/src/main/java/org/jclouds/logging/config/BindLoggersAnnotatedWithResource.java +++ b/core/src/main/java/org/jclouds/logging/config/BindLoggersAnnotatedWithResource.java @@ -26,7 +26,7 @@ package org.jclouds.logging.config; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Predicate; import static com.google.common.collect.Sets.filter; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.ProvisionException; import com.google.inject.TypeLiteral; import com.google.inject.spi.InjectionListener; diff --git a/core/src/main/java/org/jclouds/rest/HttpRequestOptionsBinder.java b/core/src/main/java/org/jclouds/rest/HttpRequestOptionsBinder.java index 542203f2ce..fe9d71f96c 100644 --- a/core/src/main/java/org/jclouds/rest/HttpRequestOptionsBinder.java +++ b/core/src/main/java/org/jclouds/rest/HttpRequestOptionsBinder.java @@ -28,7 +28,7 @@ import javax.ws.rs.core.HttpHeaders; import org.jclouds.http.HttpRequest; import org.jclouds.http.options.HttpRequestOptions; -import com.google.inject.Singleton; +import javax.inject.Singleton; /** * Adds an entity to a request. diff --git a/core/src/main/java/org/jclouds/rest/JaxrsAnnotationProcessor.java b/core/src/main/java/org/jclouds/rest/JaxrsAnnotationProcessor.java index 1a9139afdf..476c3db45e 100644 --- a/core/src/main/java/org/jclouds/rest/JaxrsAnnotationProcessor.java +++ b/core/src/main/java/org/jclouds/rest/JaxrsAnnotationProcessor.java @@ -65,14 +65,14 @@ import com.google.common.collect.MapMaker; import com.google.common.collect.Maps; import com.google.common.collect.Multimap; import com.google.common.collect.Sets; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.Injector; import com.google.inject.Key; -import com.google.inject.Singleton; +import javax.inject.Singleton; import com.google.inject.TypeLiteral; import com.google.inject.assistedinject.Assisted; import com.google.inject.internal.Lists; -import com.google.inject.name.Named; +import javax.inject.Named; /** * Tests behavior of JaxrsUtil diff --git a/core/src/main/java/org/jclouds/rest/RestClientFactory.java b/core/src/main/java/org/jclouds/rest/RestClientFactory.java index fccb5103d8..5bafbb6698 100644 --- a/core/src/main/java/org/jclouds/rest/RestClientFactory.java +++ b/core/src/main/java/org/jclouds/rest/RestClientFactory.java @@ -28,7 +28,7 @@ import java.net.URI; import org.jclouds.rest.RestClientProxy.RestClientProxyFactory; -import com.google.inject.Inject; +import javax.inject.Inject; public class RestClientFactory { private final RestClientProxyFactory proxyFactory; diff --git a/core/src/main/java/org/jclouds/rest/RestClientProxy.java b/core/src/main/java/org/jclouds/rest/RestClientProxy.java index 88228372b7..aabb5d0c28 100644 --- a/core/src/main/java/org/jclouds/rest/RestClientProxy.java +++ b/core/src/main/java/org/jclouds/rest/RestClientProxy.java @@ -44,9 +44,9 @@ import org.jclouds.http.TransformingHttpCommand; import org.jclouds.logging.Logger; import com.google.common.base.Function; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.assistedinject.Assisted; -import com.google.inject.name.Named; +import javax.inject.Named; public class RestClientProxy implements InvocationHandler { private final JaxrsAnnotationProcessor util; diff --git a/core/src/main/java/org/jclouds/rest/ToStringEntityBinder.java b/core/src/main/java/org/jclouds/rest/ToStringEntityBinder.java index a8e75dcf49..b0f80a08f7 100644 --- a/core/src/main/java/org/jclouds/rest/ToStringEntityBinder.java +++ b/core/src/main/java/org/jclouds/rest/ToStringEntityBinder.java @@ -27,7 +27,7 @@ import javax.ws.rs.core.HttpHeaders; import org.jclouds.http.HttpRequest; -import com.google.inject.Singleton; +import javax.inject.Singleton; /** * Adds an entity to a request. diff --git a/core/src/main/java/org/jclouds/util/Jsr330.java b/core/src/main/java/org/jclouds/util/Jsr330.java new file mode 100644 index 0000000000..e9e243a03e --- /dev/null +++ b/core/src/main/java/org/jclouds/util/Jsr330.java @@ -0,0 +1,80 @@ +/** + * + * Copyright (C) 2009 Global Cloud Specialists, Inc. + * + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * ==================================================================== + */ +package org.jclouds.util; + +import java.util.Enumeration; +import java.util.Map; +import java.util.Properties; + +import javax.inject.Named; + +import com.google.inject.Binder; +import com.google.inject.Key; + +/** + * Utility methods for use with {@code @}{@link Named}. + * + * @author crazybob@google.com (Bob Lee) - original code taken from + * {@link com.google.inject.name.Names} + * @author Adrian Cole + */ +public class Jsr330 { + + /** + * @see org.jclouds.util.Jsr330#named + */ + public static Named named(String name) { + return com.google.inject.util.Jsr330.named(name); + } + + /** + * Creates a constant binding to {@code @Named(key)} for each entry in {@code properties}. + */ + public static void bindProperties(Binder binder, Map properties) { + binder = binder.skipSources(Jsr330.class); + for (Map.Entry entry : properties.entrySet()) { + String key = entry.getKey(); + String value = entry.getValue(); + binder.bind(Key.get(String.class, com.google.inject.util.Jsr330.named(key))).toInstance( + value); + } + } + + /** + * Creates a constant binding to {@code @Named(key)} for each property. This method binds all + * properties including those inherited from {@link Properties#defaults defaults}. + */ + public static void bindProperties(Binder binder, Properties properties) { + binder = binder.skipSources(Jsr330.class); + + // use enumeration to include the default properties + for (Enumeration e = properties.propertyNames(); e.hasMoreElements();) { + String propertyName = (String) e.nextElement(); + String value = properties.getProperty(propertyName); + binder.bind(Key.get(String.class, com.google.inject.util.Jsr330.named(propertyName))) + .toInstance(value); + } + } + +} diff --git a/core/src/test/java/org/jclouds/http/BaseJettyTest.java b/core/src/test/java/org/jclouds/http/BaseJettyTest.java index 57680d5428..c55e8ae2eb 100644 --- a/core/src/test/java/org/jclouds/http/BaseJettyTest.java +++ b/core/src/test/java/org/jclouds/http/BaseJettyTest.java @@ -54,7 +54,7 @@ import com.google.inject.AbstractModule; import com.google.inject.Guice; import com.google.inject.Injector; import com.google.inject.Module; -import com.google.inject.name.Names; +import org.jclouds.util.Jsr330; public abstract class BaseJettyTest { protected static final String XML = "whoppers"; @@ -147,7 +147,7 @@ public abstract class BaseJettyTest { List modules = Lists.newArrayList(new AbstractModule() { @Override protected void configure() { - Names.bindProperties(binder(), properties); + Jsr330.bindProperties(binder(), properties); } }, new JDKLoggingModule(), new JaxrsModule(), createClientModule()); CloudContextBuilder.addExecutorServiceIfNotPresent(modules); diff --git a/core/src/test/java/org/jclouds/lifecycle/config/LifeCycleModuleTest.java b/core/src/test/java/org/jclouds/lifecycle/config/LifeCycleModuleTest.java index f5c50be09b..6ebfc85d7e 100644 --- a/core/src/test/java/org/jclouds/lifecycle/config/LifeCycleModuleTest.java +++ b/core/src/test/java/org/jclouds/lifecycle/config/LifeCycleModuleTest.java @@ -36,7 +36,7 @@ import org.testng.annotations.Test; import com.google.inject.AbstractModule; import com.google.inject.Guice; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.Injector; /** diff --git a/core/src/test/java/org/jclouds/logging/config/BindLoggersAnnotatedWithResourceTest.java b/core/src/test/java/org/jclouds/logging/config/BindLoggersAnnotatedWithResourceTest.java index 39be7f026c..f8ac90a207 100644 --- a/core/src/test/java/org/jclouds/logging/config/BindLoggersAnnotatedWithResourceTest.java +++ b/core/src/test/java/org/jclouds/logging/config/BindLoggersAnnotatedWithResourceTest.java @@ -41,7 +41,7 @@ import org.testng.annotations.Test; import com.google.inject.AbstractModule; import com.google.inject.Guice; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.Injector; @Test diff --git a/core/src/test/java/org/jclouds/rest/JaxrsAnnotationProcessorTest.java b/core/src/test/java/org/jclouds/rest/JaxrsAnnotationProcessorTest.java index b0f485ae7e..fe8c25b4fe 100644 --- a/core/src/test/java/org/jclouds/rest/JaxrsAnnotationProcessorTest.java +++ b/core/src/test/java/org/jclouds/rest/JaxrsAnnotationProcessorTest.java @@ -39,6 +39,7 @@ import java.util.Collections; import java.util.Map; import java.util.concurrent.Future; +import javax.inject.Named; import javax.ws.rs.GET; import javax.ws.rs.HeaderParam; import javax.ws.rs.HttpMethod; @@ -73,8 +74,7 @@ import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; import com.google.inject.AbstractModule; import com.google.inject.Guice; -import com.google.inject.name.Named; -import com.google.inject.name.Names; +import org.jclouds.util.Jsr330; /** * Tests behavior of {@code JaxrsAnnotationProcessor} @@ -990,7 +990,7 @@ public class JaxrsAnnotationProcessorTest { factory = Guice.createInjector(new AbstractModule() { @Override protected void configure() { - bindConstant().annotatedWith(Names.named("testaccount")).to("ralphie"); + bindConstant().annotatedWith(Jsr330.named("testaccount")).to("ralphie"); bind(URI.class).toInstance(URI.create("http://localhost:8080")); } }, new JaxrsModule(), new ExecutorServiceModule(new WithinThreadExecutorService()), diff --git a/extensions/gae/src/main/java/org/jclouds/gae/GaeHttpCommandExecutorService.java b/extensions/gae/src/main/java/org/jclouds/gae/GaeHttpCommandExecutorService.java index c9335bc9c7..b8209224ab 100644 --- a/extensions/gae/src/main/java/org/jclouds/gae/GaeHttpCommandExecutorService.java +++ b/extensions/gae/src/main/java/org/jclouds/gae/GaeHttpCommandExecutorService.java @@ -56,7 +56,7 @@ import com.google.appengine.api.urlfetch.HTTPRequest; import com.google.appengine.api.urlfetch.HTTPResponse; import com.google.appengine.api.urlfetch.URLFetchService; import com.google.common.annotations.VisibleForTesting; -import com.google.inject.Inject; +import javax.inject.Inject; /** * Google App Engine version of {@link HttpCommandExecutorService} diff --git a/extensions/gae/src/test/java/org/jclouds/gae/config/GaeHttpCommandExecutorServiceModuleTest.java b/extensions/gae/src/test/java/org/jclouds/gae/config/GaeHttpCommandExecutorServiceModuleTest.java index 463a90145d..0a19a109c2 100644 --- a/extensions/gae/src/test/java/org/jclouds/gae/config/GaeHttpCommandExecutorServiceModuleTest.java +++ b/extensions/gae/src/test/java/org/jclouds/gae/config/GaeHttpCommandExecutorServiceModuleTest.java @@ -37,7 +37,7 @@ import org.testng.annotations.Test; import com.google.inject.Guice; import com.google.inject.Injector; -import com.google.inject.name.Names; +import org.jclouds.util.Jsr330; /** * Tests the ability to configure a {@link GaeHttpCommandExecutorService} @@ -58,7 +58,7 @@ public class GaeHttpCommandExecutorServiceModuleTest { new GaeHttpCommandExecutorServiceModule() { @Override protected void configure() { - Names.bindProperties(binder(), properties); + Jsr330.bindProperties(binder(), properties); super.configure(); } }); diff --git a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/config/NioTransformingHttpCommandExecutorServiceModule.java b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/config/NioTransformingHttpCommandExecutorServiceModule.java index 812bcbe364..4a0a6144d7 100644 --- a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/config/NioTransformingHttpCommandExecutorServiceModule.java +++ b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/config/NioTransformingHttpCommandExecutorServiceModule.java @@ -27,6 +27,10 @@ import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; + import org.apache.http.ConnectionReuseStrategy; import org.apache.http.HttpEntity; import org.apache.http.impl.DefaultConnectionReuseStrategy; @@ -57,14 +61,11 @@ import org.jclouds.http.httpnio.pool.NioTransformingHttpCommandExecutorService; import org.jclouds.http.pool.PoolConstants; import org.jclouds.http.pool.config.ConnectionPoolCommandExecutorServiceModule; -import com.google.inject.Inject; import com.google.inject.Provides; import com.google.inject.Scopes; -import com.google.inject.Singleton; import com.google.inject.TypeLiteral; import com.google.inject.assistedinject.Assisted; import com.google.inject.assistedinject.FactoryProvider; -import com.google.inject.name.Named; /** * @@ -125,10 +126,9 @@ public class NioTransformingHttpCommandExecutorServiceModule extends Scopes.SINGLETON); bind(ByteBufferAllocator.class).to(HeapByteBufferAllocator.class); bind(NioHttpCommandConnectionPool.Factory.class).toProvider( - FactoryProvider.newFactory( - new TypeLiteral() { - }, new TypeLiteral() { - })); + FactoryProvider.newFactory(new TypeLiteral() { + }, new TypeLiteral() { + })); } static class InjectableBufferingNHttpEntity extends BufferingNHttpEntity { diff --git a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/NioHttpCommandConnectionPool.java b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/NioHttpCommandConnectionPool.java index c3a4cc9450..a116426653 100644 --- a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/NioHttpCommandConnectionPool.java +++ b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/NioHttpCommandConnectionPool.java @@ -58,9 +58,9 @@ import org.jclouds.http.pool.HttpCommandConnectionPool; import org.jclouds.http.pool.PoolConstants; import com.google.common.annotations.VisibleForTesting; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.assistedinject.Assisted; -import com.google.inject.name.Named; +import javax.inject.Named; /** * Connection Pool for HTTP requests that utilizes Apache HTTPNio diff --git a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/NioHttpCommandExecutionHandler.java b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/NioHttpCommandExecutionHandler.java index 4d32e7c300..ae9eb56090 100644 --- a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/NioHttpCommandExecutionHandler.java +++ b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/NioHttpCommandExecutionHandler.java @@ -43,7 +43,7 @@ import org.jclouds.http.handlers.DelegatingRetryHandler; import org.jclouds.http.httpnio.util.NioHttpUtils; import org.jclouds.logging.Logger; -import com.google.inject.Inject; +import javax.inject.Inject; /** * // TODO: Adrian: Document this! diff --git a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/NioTransformingHttpCommandExecutorService.java b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/NioTransformingHttpCommandExecutorService.java index 4a6c86899f..cb4753ecf7 100644 --- a/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/NioTransformingHttpCommandExecutorService.java +++ b/extensions/httpnio/src/main/java/org/jclouds/http/httpnio/pool/NioTransformingHttpCommandExecutorService.java @@ -30,8 +30,8 @@ import org.apache.http.nio.NHttpConnection; import org.jclouds.http.HttpCommandRendezvous; import org.jclouds.http.pool.ConnectionPoolTransformingHttpCommandExecutorService; -import com.google.inject.Inject; -import com.google.inject.Singleton; +import javax.inject.Inject; +import javax.inject.Singleton; /** * // TODO: Adrian: Document this! diff --git a/extensions/ssh/jsch/src/main/java/org/jclouds/ssh/jsch/JschSshConnection.java b/extensions/ssh/jsch/src/main/java/org/jclouds/ssh/jsch/JschSshConnection.java index 3e04abb48a..ee7b4bde7a 100644 --- a/extensions/ssh/jsch/src/main/java/org/jclouds/ssh/jsch/JschSshConnection.java +++ b/extensions/ssh/jsch/src/main/java/org/jclouds/ssh/jsch/JschSshConnection.java @@ -43,7 +43,7 @@ import org.jclouds.ssh.SshConnection; import org.jclouds.ssh.SshException; import org.jclouds.util.Utils; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.assistedinject.Assisted; import com.jcraft.jsch.ChannelExec; import com.jcraft.jsch.ChannelSftp; diff --git a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/binders/CFObjectBinder.java b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/binders/CFObjectBinder.java index 017e59c477..e72bf5913d 100644 --- a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/binders/CFObjectBinder.java +++ b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/binders/CFObjectBinder.java @@ -32,8 +32,8 @@ import org.jclouds.blobstore.domain.Blob; import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpUtils; -import com.google.inject.Inject; -import com.google.inject.name.Named; +import javax.inject.Inject; +import javax.inject.Named; public class CFObjectBinder extends BlobBinder { @Inject diff --git a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/config/RestCloudFilesBlobStoreModule.java b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/config/RestCloudFilesBlobStoreModule.java index 418355f0f3..f563737ebb 100755 --- a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/config/RestCloudFilesBlobStoreModule.java +++ b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/config/RestCloudFilesBlobStoreModule.java @@ -33,7 +33,7 @@ import org.jclouds.rest.RestClientFactory; import com.google.inject.AbstractModule; import com.google.inject.Provides; -import com.google.inject.Singleton; +import javax.inject.Singleton; /** * Configures the Cloud Files connection, including logging and http transport. diff --git a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/config/RestCloudFilesCDNConnectionModule.java b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/config/RestCloudFilesCDNConnectionModule.java index 28fa00e164..c8891c5f8e 100644 --- a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/config/RestCloudFilesCDNConnectionModule.java +++ b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/config/RestCloudFilesCDNConnectionModule.java @@ -35,7 +35,7 @@ import org.jclouds.rest.RestClientFactory; import com.google.inject.AbstractModule; import com.google.inject.Provides; -import com.google.inject.Singleton; +import javax.inject.Singleton; /** * Configures the Cloud Files CDN connection, including logging and http transport. diff --git a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseBlobMetadataListFromJsonResponse.java b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseBlobMetadataListFromJsonResponse.java index e324506a6d..d95fe9bbd9 100644 --- a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseBlobMetadataListFromJsonResponse.java +++ b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseBlobMetadataListFromJsonResponse.java @@ -38,7 +38,7 @@ import com.google.common.base.Function; import com.google.common.collect.Lists; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; -import com.google.inject.Inject; +import javax.inject.Inject; /** * This parses {@link BlobMetadata} from a gson string. diff --git a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseContainerCDNMetadataListFromGsonResponse.java b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseContainerCDNMetadataListFromGsonResponse.java index c8a3d18c8f..1fe951f55e 100644 --- a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseContainerCDNMetadataListFromGsonResponse.java +++ b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseContainerCDNMetadataListFromGsonResponse.java @@ -34,7 +34,7 @@ import org.jclouds.rackspace.cloudfiles.domain.ContainerCDNMetadata; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; -import com.google.inject.Inject; +import javax.inject.Inject; /** * This parses {@link ContainerCDNMetadata} from a gson string. diff --git a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseContainerListFromJsonResponse.java b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseContainerListFromJsonResponse.java index 4f6655d5f4..6905a343e0 100755 --- a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseContainerListFromJsonResponse.java +++ b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseContainerListFromJsonResponse.java @@ -34,7 +34,7 @@ import org.jclouds.rackspace.cloudfiles.domain.ContainerMetadata; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; -import com.google.inject.Inject; +import javax.inject.Inject; /** * This parses {@link ContainerMetadata} from a gson string. diff --git a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseObjectFromHeadersAndHttpContent.java b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseObjectFromHeadersAndHttpContent.java index 9e816563be..947ff0e0a7 100644 --- a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseObjectFromHeadersAndHttpContent.java +++ b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseObjectFromHeadersAndHttpContent.java @@ -28,7 +28,7 @@ import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.blobstore.functions.ParseBlobFromHeadersAndHttpContent; import org.jclouds.blobstore.functions.ParseBlobMetadataFromHeaders; -import com.google.inject.Inject; +import javax.inject.Inject; /** * Parses response headers and creates a new Rackspace object from them and the HTTP content. diff --git a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseObjectMetadataFromHeaders.java b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseObjectMetadataFromHeaders.java index 7d9102dda4..f4ba9d31c5 100644 --- a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseObjectMetadataFromHeaders.java +++ b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/functions/ParseObjectMetadataFromHeaders.java @@ -32,8 +32,8 @@ import org.jclouds.http.HttpUtils; import org.jclouds.util.DateService; import com.google.common.annotations.VisibleForTesting; -import com.google.inject.Inject; -import com.google.inject.name.Named; +import javax.inject.Inject; +import javax.inject.Named; /** * @author Adrian Cole diff --git a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/internal/GuiceCloudFilesCDNContext.java b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/internal/GuiceCloudFilesCDNContext.java index 438c51e06a..425fcdb13f 100644 --- a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/internal/GuiceCloudFilesCDNContext.java +++ b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/internal/GuiceCloudFilesCDNContext.java @@ -35,9 +35,9 @@ import org.jclouds.rackspace.cloudfiles.CloudFilesCDNConnection; import org.jclouds.rackspace.cloudfiles.CloudFilesCDNContext; import org.jclouds.rackspace.reference.RackspaceConstants; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.Injector; -import com.google.inject.name.Named; +import javax.inject.Named; /** * Uses a Guice Injector to configure the objects served by CloudFilesCDNContext methods. diff --git a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/internal/GuiceCloudFilesContext.java b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/internal/GuiceCloudFilesContext.java index 53b8bd56a2..23200f4650 100644 --- a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/internal/GuiceCloudFilesContext.java +++ b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/internal/GuiceCloudFilesContext.java @@ -39,9 +39,9 @@ import org.jclouds.rackspace.cloudfiles.CloudFilesBlobStore; import org.jclouds.rackspace.cloudfiles.CloudFilesContext; import org.jclouds.rackspace.reference.RackspaceConstants; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.Injector; -import com.google.inject.name.Named; +import javax.inject.Named; /** * Uses a Guice Injector to configure the objects served by CloudFilesContext methods. diff --git a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/internal/LiveCloudFilesInputStreamMap.java b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/internal/LiveCloudFilesInputStreamMap.java index 54602a7ea0..dd2520e5b6 100644 --- a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/internal/LiveCloudFilesInputStreamMap.java +++ b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/internal/LiveCloudFilesInputStreamMap.java @@ -29,7 +29,7 @@ import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.rackspace.cloudfiles.CloudFilesBlobStore; import org.jclouds.rackspace.cloudfiles.domain.ContainerMetadata; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.assistedinject.Assisted; /** diff --git a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/internal/LiveCloudFilesObjectMap.java b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/internal/LiveCloudFilesObjectMap.java index 5a3388f673..f0ff396a34 100644 --- a/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/internal/LiveCloudFilesObjectMap.java +++ b/rackspace/cloudfiles/core/src/main/java/org/jclouds/rackspace/cloudfiles/internal/LiveCloudFilesObjectMap.java @@ -29,7 +29,7 @@ import org.jclouds.blobstore.domain.BlobMetadata; import org.jclouds.rackspace.cloudfiles.CloudFilesBlobStore; import org.jclouds.rackspace.cloudfiles.domain.ContainerMetadata; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.assistedinject.Assisted; /** diff --git a/rackspace/cloudfiles/core/src/test/java/org/jclouds/rackspace/cloudfiles/CloudFilesBlobStoreLiveTest.java b/rackspace/cloudfiles/core/src/test/java/org/jclouds/rackspace/cloudfiles/CloudFilesBlobStoreLiveTest.java index 7bc12e1013..15d975ab1d 100644 --- a/rackspace/cloudfiles/core/src/test/java/org/jclouds/rackspace/cloudfiles/CloudFilesBlobStoreLiveTest.java +++ b/rackspace/cloudfiles/core/src/test/java/org/jclouds/rackspace/cloudfiles/CloudFilesBlobStoreLiveTest.java @@ -78,10 +78,10 @@ public class CloudFilesBlobStoreLiveTest { assertTrue(initialContainerCount >= 0); // Create test containers - String[] containerNames = new String[] { bucketPrefix + ".testListOwnedContainers1", + String[] containerJsr330 = new String[] { bucketPrefix + ".testListOwnedContainers1", bucketPrefix + ".testListOwnedContainers2" }; - assertTrue(connection.createContainer(containerNames[0]).get(10, TimeUnit.SECONDS)); - assertTrue(connection.createContainer(containerNames[1]).get(10, TimeUnit.SECONDS)); + assertTrue(connection.createContainer(containerJsr330[0]).get(10, TimeUnit.SECONDS)); + assertTrue(connection.createContainer(containerJsr330[1]).get(10, TimeUnit.SECONDS)); // Test default listing response = connection.listContainers(); @@ -90,18 +90,18 @@ public class CloudFilesBlobStoreLiveTest { // Test listing with options response = connection.listContainers(ListContainerOptions.Builder.afterMarker( - containerNames[0].substring(0, containerNames[0].length() - 1)).maxResults(1)); + containerJsr330[0].substring(0, containerJsr330[0].length() - 1)).maxResults(1)); assertEquals(response.size(), 1); - assertEquals(response.get(0).getName(), containerNames[0]); + assertEquals(response.get(0).getName(), containerJsr330[0]); response = connection.listContainers(ListContainerOptions.Builder.afterMarker( - containerNames[0]).maxResults(1)); + containerJsr330[0]).maxResults(1)); assertEquals(response.size(), 1); - assertEquals(response.get(0).getName(), containerNames[1]); + assertEquals(response.get(0).getName(), containerJsr330[1]); // Cleanup and test containers have been removed - assertTrue(connection.deleteContainer(containerNames[0]).get(10, TimeUnit.SECONDS)); - assertTrue(connection.deleteContainer(containerNames[1]).get(10, TimeUnit.SECONDS)); + assertTrue(connection.deleteContainer(containerJsr330[0]).get(10, TimeUnit.SECONDS)); + assertTrue(connection.deleteContainer(containerJsr330[1]).get(10, TimeUnit.SECONDS)); response = connection.listContainers(); // assertEquals(response.size(), initialContainerCount + 2);// if the containers already // exist, this will fail diff --git a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/config/RestCloudServersConnectionModule.java b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/config/RestCloudServersConnectionModule.java index c71f8dd4a1..b26a14bec2 100755 --- a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/config/RestCloudServersConnectionModule.java +++ b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/config/RestCloudServersConnectionModule.java @@ -35,7 +35,7 @@ import org.jclouds.rest.RestClientFactory; import com.google.inject.AbstractModule; import com.google.inject.Provides; -import com.google.inject.Singleton; +import javax.inject.Singleton; /** * Configures the Cloud Servers connection, including logging and http transport. diff --git a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseAddressesFromJsonResponse.java b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseAddressesFromJsonResponse.java index f561dce407..bc2e0dcc4e 100644 --- a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseAddressesFromJsonResponse.java +++ b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseAddressesFromJsonResponse.java @@ -31,7 +31,7 @@ import org.jclouds.http.functions.ParseJson; import org.jclouds.rackspace.cloudservers.domain.Addresses; import com.google.gson.Gson; -import com.google.inject.Inject; +import javax.inject.Inject; /** * This parses {@link Addresses} from a gson string. diff --git a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseBackupScheduleFromJsonResponse.java b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseBackupScheduleFromJsonResponse.java index 7700c4bf13..5711c8537c 100644 --- a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseBackupScheduleFromJsonResponse.java +++ b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseBackupScheduleFromJsonResponse.java @@ -31,7 +31,7 @@ import org.jclouds.http.functions.ParseJson; import org.jclouds.rackspace.cloudservers.domain.BackupSchedule; import com.google.gson.Gson; -import com.google.inject.Inject; +import javax.inject.Inject; /** * This parses {@link BackupSchedule} from a gson string. diff --git a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseFlavorFromJsonResponse.java b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseFlavorFromJsonResponse.java index 8ca9d0ef23..6f978ed98d 100644 --- a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseFlavorFromJsonResponse.java +++ b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseFlavorFromJsonResponse.java @@ -31,7 +31,7 @@ import org.jclouds.http.functions.ParseJson; import org.jclouds.rackspace.cloudservers.domain.Flavor; import com.google.gson.Gson; -import com.google.inject.Inject; +import javax.inject.Inject; /** * This parses {@link Flavor} from a gson string. diff --git a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseFlavorListFromJsonResponse.java b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseFlavorListFromJsonResponse.java index 30e0a64672..1bf08f97c4 100644 --- a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseFlavorListFromJsonResponse.java +++ b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseFlavorListFromJsonResponse.java @@ -32,7 +32,7 @@ import org.jclouds.http.functions.ParseJson; import org.jclouds.rackspace.cloudservers.domain.Flavor; import com.google.gson.Gson; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.internal.Lists; /** diff --git a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseImageFromJsonResponse.java b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseImageFromJsonResponse.java index 9c6a55e5cd..dd87133d3c 100644 --- a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseImageFromJsonResponse.java +++ b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseImageFromJsonResponse.java @@ -31,7 +31,7 @@ import org.jclouds.http.functions.ParseJson; import org.jclouds.rackspace.cloudservers.domain.Image; import com.google.gson.Gson; -import com.google.inject.Inject; +import javax.inject.Inject; /** * This parses {@link Image} from a gson string. diff --git a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseImageListFromJsonResponse.java b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseImageListFromJsonResponse.java index a28f341246..700c6bbf47 100644 --- a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseImageListFromJsonResponse.java +++ b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseImageListFromJsonResponse.java @@ -32,7 +32,7 @@ import org.jclouds.http.functions.ParseJson; import org.jclouds.rackspace.cloudservers.domain.Image; import com.google.gson.Gson; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.internal.Lists; /** diff --git a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseInetAddressListFromJsonResponse.java b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseInetAddressListFromJsonResponse.java index b2d17cde78..df875c4749 100644 --- a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseInetAddressListFromJsonResponse.java +++ b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseInetAddressListFromJsonResponse.java @@ -35,7 +35,7 @@ import org.jclouds.http.functions.ParseJson; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; -import com.google.inject.Inject; +import javax.inject.Inject; /** * This parses a list of {@link InetAddress} from a gson string. diff --git a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseServerFromJsonResponse.java b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseServerFromJsonResponse.java index f8900fcee3..24bbbd8997 100644 --- a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseServerFromJsonResponse.java +++ b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseServerFromJsonResponse.java @@ -31,7 +31,7 @@ import org.jclouds.http.functions.ParseJson; import org.jclouds.rackspace.cloudservers.domain.Server; import com.google.gson.Gson; -import com.google.inject.Inject; +import javax.inject.Inject; /** * This parses {@link Server} from a gson string. diff --git a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseServerListFromJsonResponse.java b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseServerListFromJsonResponse.java index 4748eac44e..365bfe266b 100755 --- a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseServerListFromJsonResponse.java +++ b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseServerListFromJsonResponse.java @@ -32,7 +32,7 @@ import org.jclouds.http.functions.ParseJson; import org.jclouds.rackspace.cloudservers.domain.Server; import com.google.gson.Gson; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.internal.Lists; /** diff --git a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseSharedIpGroupFromJsonResponse.java b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseSharedIpGroupFromJsonResponse.java index 1f81381aa3..ed19f92d2f 100644 --- a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseSharedIpGroupFromJsonResponse.java +++ b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseSharedIpGroupFromJsonResponse.java @@ -31,7 +31,7 @@ import org.jclouds.http.functions.ParseJson; import org.jclouds.rackspace.cloudservers.domain.SharedIpGroup; import com.google.gson.Gson; -import com.google.inject.Inject; +import javax.inject.Inject; /** * This parses {@link SharedIpGroup} from a gson string. diff --git a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseSharedIpGroupListFromJsonResponse.java b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseSharedIpGroupListFromJsonResponse.java index fc1ef9e6f6..cc00b788f7 100644 --- a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseSharedIpGroupListFromJsonResponse.java +++ b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/functions/ParseSharedIpGroupListFromJsonResponse.java @@ -32,7 +32,7 @@ import org.jclouds.http.functions.ParseJson; import org.jclouds.rackspace.cloudservers.domain.SharedIpGroup; import com.google.gson.Gson; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.internal.Lists; /** diff --git a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/internal/GuiceCloudServersContext.java b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/internal/GuiceCloudServersContext.java index f5ab32aad3..3e2d58defe 100755 --- a/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/internal/GuiceCloudServersContext.java +++ b/rackspace/cloudservers/core/src/main/java/org/jclouds/rackspace/cloudservers/internal/GuiceCloudServersContext.java @@ -35,9 +35,9 @@ import org.jclouds.rackspace.cloudservers.CloudServersConnection; import org.jclouds.rackspace.cloudservers.CloudServersContext; import org.jclouds.rackspace.reference.RackspaceConstants; -import com.google.inject.Inject; +import javax.inject.Inject; import com.google.inject.Injector; -import com.google.inject.name.Named; +import javax.inject.Named; /** * Uses a Guice Injector to configure the objects served by CloudServersContext methods. diff --git a/rackspace/core/src/main/java/org/jclouds/rackspace/Authentication.java b/rackspace/core/src/main/java/org/jclouds/rackspace/Authentication.java index bdf82d2c6e..e7d71df0cd 100755 --- a/rackspace/core/src/main/java/org/jclouds/rackspace/Authentication.java +++ b/rackspace/core/src/main/java/org/jclouds/rackspace/Authentication.java @@ -28,7 +28,7 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import com.google.inject.BindingAnnotation; +import javax.inject.Qualifier; /** * Represents an authenticated context to Rackspace. @@ -39,7 +39,7 @@ import com.google.inject.BindingAnnotation; */ @Retention(value = RetentionPolicy.RUNTIME) @Target(value = { ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD }) -@BindingAnnotation +@Qualifier public @interface Authentication { } \ No newline at end of file diff --git a/rackspace/core/src/main/java/org/jclouds/rackspace/CDN.java b/rackspace/core/src/main/java/org/jclouds/rackspace/CDN.java index 082a007ae2..3b96470f94 100755 --- a/rackspace/core/src/main/java/org/jclouds/rackspace/CDN.java +++ b/rackspace/core/src/main/java/org/jclouds/rackspace/CDN.java @@ -28,7 +28,7 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import com.google.inject.BindingAnnotation; +import javax.inject.Qualifier; /** * Represents a component related to Rackspace Cloud Files Content delivery network. @@ -39,7 +39,7 @@ import com.google.inject.BindingAnnotation; */ @Retention(value = RetentionPolicy.RUNTIME) @Target(value = { ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD }) -@BindingAnnotation +@Qualifier public @interface CDN { } \ No newline at end of file diff --git a/rackspace/core/src/main/java/org/jclouds/rackspace/Server.java b/rackspace/core/src/main/java/org/jclouds/rackspace/Server.java index 1824b8f10c..715adb83c8 100644 --- a/rackspace/core/src/main/java/org/jclouds/rackspace/Server.java +++ b/rackspace/core/src/main/java/org/jclouds/rackspace/Server.java @@ -28,7 +28,7 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import com.google.inject.BindingAnnotation; +import javax.inject.Qualifier; /** * Represents a component related to Rackspace Cloud Servers. @@ -39,7 +39,7 @@ import com.google.inject.BindingAnnotation; */ @Retention(value = RetentionPolicy.RUNTIME) @Target(value = { ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD }) -@BindingAnnotation +@Qualifier public @interface Server { } \ No newline at end of file diff --git a/rackspace/core/src/main/java/org/jclouds/rackspace/Storage.java b/rackspace/core/src/main/java/org/jclouds/rackspace/Storage.java index bb22041f58..1c004a7297 100755 --- a/rackspace/core/src/main/java/org/jclouds/rackspace/Storage.java +++ b/rackspace/core/src/main/java/org/jclouds/rackspace/Storage.java @@ -28,7 +28,7 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import com.google.inject.BindingAnnotation; +import javax.inject.Qualifier; /** * Represents a component related to Rackspace Cloud Files. @@ -39,7 +39,7 @@ import com.google.inject.BindingAnnotation; */ @Retention(value = RetentionPolicy.RUNTIME) @Target(value = { ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD }) -@BindingAnnotation +@Qualifier public @interface Storage { } \ No newline at end of file diff --git a/rackspace/core/src/main/java/org/jclouds/rackspace/config/RackspaceAuthenticationModule.java b/rackspace/core/src/main/java/org/jclouds/rackspace/config/RackspaceAuthenticationModule.java index 586e8bbc73..841cef5985 100755 --- a/rackspace/core/src/main/java/org/jclouds/rackspace/config/RackspaceAuthenticationModule.java +++ b/rackspace/core/src/main/java/org/jclouds/rackspace/config/RackspaceAuthenticationModule.java @@ -42,8 +42,8 @@ import org.jclouds.rest.config.JaxrsModule; import com.google.inject.AbstractModule; import com.google.inject.Provides; -import com.google.inject.Singleton; -import com.google.inject.name.Named; +import javax.inject.Singleton; +import javax.inject.Named; /** * Configures the Rackspace authentication service connection, including logging and http transport. diff --git a/rackspace/core/src/main/java/org/jclouds/rackspace/filters/AuthenticateRequest.java b/rackspace/core/src/main/java/org/jclouds/rackspace/filters/AuthenticateRequest.java index baca6f3386..0279471913 100755 --- a/rackspace/core/src/main/java/org/jclouds/rackspace/filters/AuthenticateRequest.java +++ b/rackspace/core/src/main/java/org/jclouds/rackspace/filters/AuthenticateRequest.java @@ -33,9 +33,9 @@ import org.jclouds.http.HttpRequestFilter; import org.jclouds.rackspace.Authentication; import org.jclouds.rackspace.reference.RackspaceHeaders; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; +import javax.inject.Inject; +import javax.inject.Provider; +import javax.inject.Singleton; /** * Signs the Rackspace request. This will update the Authentication Token before 24 hours is up. diff --git a/rackspace/core/src/test/java/org/jclouds/rackspace/RackspaceAuthenticationLiveTest.java b/rackspace/core/src/test/java/org/jclouds/rackspace/RackspaceAuthenticationLiveTest.java index d8e91c584c..04ca3049b8 100644 --- a/rackspace/core/src/test/java/org/jclouds/rackspace/RackspaceAuthenticationLiveTest.java +++ b/rackspace/core/src/test/java/org/jclouds/rackspace/RackspaceAuthenticationLiveTest.java @@ -44,7 +44,7 @@ import com.google.inject.AbstractModule; import com.google.inject.Guice; import com.google.inject.Injector; import com.google.inject.Provides; -import com.google.inject.Singleton; +import javax.inject.Singleton; /** * Tests behavior of {@code JaxrsAnnotationProcessor}