diff --git a/demos/gae-tweetstore/pom.xml b/demos/gae-tweetstore/pom.xml
index f379bbbcc8..77d100421c 100644
--- a/demos/gae-tweetstore/pom.xml
+++ b/demos/gae-tweetstore/pom.xml
@@ -19,296 +19,304 @@
-->
- 4.0.0
- org.jclouds.demos
- gae-replicator
- 1.0-SNAPSHOT
- war
- JClouds example to replicate the contents of a container
- JClouds example to replicate the contents of a container
+ 4.0.0
+
+ org.jclouds
+ jclouds-demos-project
+ 1.0-SNAPSHOT
+
+ jclouds-demo-gae-tweetstore
+ war
+ JClouds TweetStore for Google App Engine
+ JClouds TweetStore for Google App Engine using Guice for Dependency Injection
-
-
- YOUR_APPENGINE_HOME
- jclouds-replicate
- localhost
- 8088
- googlestorage
- cloudfiles-us,aws-s3,azureblob
- jclouds-replicate
-
+
+
+ jclouds-replicate
+ 1.4.2
+ localhost
+ 8088
+ googlestorage
+ cloudfiles-us,aws-s3,azureblob
+ jclouds-replicate
+
-
-
- ${project.groupId}
- jclouds-allblobstore
- ${project.version}
-
-
- ${project.groupId}
- jclouds-blobstore
- ${project.version}
- test-jar
- test
-
-
- ${project.groupId}
- jclouds-core
- ${project.version}
- test-jar
- test
-
-
- org.jclouds.driver
- jclouds-log4j
- ${project.version}
- test
-
-
- log4j
- log4j
- 1.2.16
- test
-
-
- org.jclouds.driver
- gae
- ${project.version}
-
-
- com.google.inject.extensions
- guice-servlet
- 3.0
-
-
- displaytag
- displaytag
- 1.2
-
-
- org.slf4j
- slf4j-log4j12
-
-
-
-
- org.slf4j
- slf4j-jdk14
- 1.5.6
-
-
- standard
- taglibs
- 1.1.2
- runtime
-
-
- jstl
- javax.servlet
- 1.1.2
-
+
+
+ ${project.groupId}
+ jclouds-blobstore
+ ${project.version}
+
+
+ org.twitter4j
+ twitter4j-core
+ [2.1,)
+
+
+ ${project.groupId}
+ jclouds-blobstore
+ ${project.version}
+ test-jar
+ test
+
+
+ org.jclouds.provider
+ aws-s3
+ ${project.version}
+
+
+ ${project.groupId}
+ jclouds-atmos
+ ${project.version}
+
+
+ ${project.groupId}
+ jclouds-azure
+ ${project.version}
+
+
+ ${project.groupId}
+ jclouds-rackspace
+ ${project.version}
+
+
+ org.jclouds.driver
+ jclouds-gae
+ ${project.version}
+
+
+ com.google.inject.extensions
+ guice-servlet
+ 3.0
+
+
+ displaytag
+ displaytag
+ 1.2
+
+
+ org.slf4j
+ slf4j-log4j12
+
+
+
+
+ org.slf4j
+ slf4j-jdk14
+ 1.5.6
+
+
+ jstl
+ javax.servlet
+ 1.1.2
+
+
+ standard
+ taglibs
+ 1.1.2
+ runtime
+
+
+ javax.servlet
+ servlet-api
+ 2.5
+ provided
+
+
+
+
+ com.google.appengine
+ appengine-api-1.0-sdk
+ ${appengine.sdk.version}
+
+
+ com.google.appengine
+ appengine-tools-sdk
+ ${appengine.sdk.version}
+
-
-
- com.google.appengine
- appengine-api-1.0-sdk
- 1.4.2
-
+
+
+ org.apache.geronimo.specs
+ geronimo-jta_1.1_spec
+ 1.1.1
+ runtime
+
+
+ org.apache.geronimo.specs
+ geronimo-jpa_3.0_spec
+ 1.1.1
+ runtime
+
+
+ com.google.appengine.orm
+ jdo2-api
+ 2.3-eb
+ runtime
+
+
+ org.datanucleus
+ datanucleus-core
+ 1.1.5
+
+
+ com.google.appengine.orm
+ datanucleus-appengine
+ 1.0.8
+ runtime
+
+
+ org.datanucleus
+ datanucleus-jpa
+ 1.1.5
+ runtime
+
+
+
+ ${project.artifactId}
+
+
+ maven-war-plugin
+
+
+
+ src/main/appengine
+ WEB-INF/
+ true
+
+
+
+
+
+ maven-surefire-plugin
+
+
+ integration
+ integration-test
+
+ test
+
+
+
+
+ appengine.home
+ ${appengine.home}
+
+
+ devappserver.address
+ ${devappserver.address}
+
+
+ devappserver.port
+ ${devappserver.port}
+
+
+ warfile
+ ${project.build.directory}/${project.artifactId}
+
+
+
+ ${appengine.home}/lib/appengine-tools-api.jar
+
+
+ true
+ ${appengine.home}/bin
+ ${appengine.home}/lib
+ ${appengine.home}/config/sdk
+
+
+
+
+
+
+
-
-
- org.apache.geronimo.specs
- geronimo-jta_1.1_spec
- 1.1.1
- runtime
-
-
-
- org.apache.geronimo.specs
- geronimo-jpa_3.0_spec
- 1.1.1
- runtime
-
-
-
- com.google.appengine.orm
- jdo2-api
- 2.3-eb
- runtime
-
-
-
- org.datanucleus
- datanucleus-core
- 1.1.5
-
-
-
- com.google.appengine.orm
- datanucleus-appengine
- 1.0.8
- runtime
-
-
-
- org.datanucleus
- datanucleus-jpa
- 1.1.5
- runtime
-
-
-
-
- com.google.appengine
- appengine-tools-sdk
- 1.4.2
-
-
-
- ${project.artifactId}
-
-
- maven-war-plugin
-
-
-
- src/main/appengine
- WEB-INF/
- true
-
-
-
-
-
- maven-surefire-plugin
-
-
- integration
- integration-test
-
- test
-
-
-
-
- appengine.home
- ${appengine.home}
-
-
- devappserver.address
- ${devappserver.address}
-
-
- devappserver.port
- ${devappserver.port}
-
-
- warfile
- ${project.build.directory}/${project.artifactId}
-
-
-
- ${appengine.home}/lib/appengine-tools-api.jar
-
-
- true
- ${appengine.home}/bin
- ${appengine.home}/lib
- ${appengine.home}/config/sdk
-
-
-
-
-
-
-
-
-
-
- live
-
-
-
- maven-surefire-plugin
-
-
- integration
- integration-test
-
- test
-
-
-
-
- test.azureblob.identity
- ${test.azureblob.identity}
-
-
- test.azureblob.credential
- ${test.azureblob.credential}
-
-
- test.cloudfiles-us.identity
- ${test.cloudfiles-us.identity}
-
-
- test.cloudfiles-us.credential
- ${test.cloudfiles-us.credential}
-
-
- test.aws-s3.identity
- ${test.aws-s3.identity}
-
-
- test.aws-s3.credential
- ${test.aws-s3.credential}
-
-
- test.googlestorage.identity
- ${test.googlestorage.identity}
-
-
- test.googlestorage.credential
- ${test.googlestorage.credential}
-
-
- appengine.home
- ${appengine.home}
-
-
- devappserver.address
- ${devappserver.address}
-
-
- devappserver.port
- ${devappserver.port}
-
-
- jclouds.replicate.source
- ${jclouds.replicate.source}
-
-
- jclouds.replicate.destinations
- ${jclouds.replicate.destinations}
-
-
- jclouds.replicate.container
- ${jclouds.replicate.container}
-
-
- warfile
- ${project.build.directory}/${project.artifactId}
-
-
-
-
-
-
-
-
-
-
+
+
+ live
+
+
+
+ maven-surefire-plugin
+
+
+ integration
+ integration-test
+
+ test
+
+
+
+
+ test.azureblob.identity
+ ${test.azureblob.identity}
+
+
+ test.azureblob.credential
+ ${test.azureblob.credential}
+
+
+ test.cloudfiles-us.identity
+ ${test.cloudfiles-us.identity}
+
+
+ test.cloudfiles-us.credential
+ ${test.cloudfiles-us.credential}
+
+
+ test.aws-s3.identity
+ ${test.aws-s3.identity}
+
+
+ test.aws-s3.credential
+ ${test.aws-s3.credential}
+
+
+ test.googlestorage.identity
+ ${test.googlestorage.identity}
+
+
+ test.googlestorage.credential
+ ${test.googlestorage.credential}
+
+
+ appengine.home
+ ${appengine.home}
+
+
+ devappserver.address
+ ${devappserver.address}
+
+
+ devappserver.port
+ ${devappserver.port}
+
+
+ jclouds.replicate.source
+ ${jclouds.replicate.source}
+
+
+ jclouds.replicate.destinations
+ ${jclouds.replicate.destinations}
+
+
+ jclouds.replicate.container
+ ${jclouds.replicate.container}
+
+
+ warfile
+ ${project.build.directory}/${project.artifactId}
+
+
+
+
+
+
+
+
+
+
diff --git a/demos/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java b/demos/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java
index 5b7b9e0afc..fd2b7afb7b 100755
--- a/demos/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java
+++ b/demos/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/config/GuiceServletConfig.java
@@ -18,7 +18,7 @@
*/
package org.jclouds.demo.tweetstore.config;
-import static com.google.appengine.api.labs.taskqueue.TaskOptions.Builder.url;
+import static com.google.appengine.api.taskqueue.TaskOptions.Builder.withUrl;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_CONTAINER;
@@ -38,10 +38,13 @@ import org.jclouds.gae.config.GoogleAppEngineConfigurationModule;
import twitter4j.Twitter;
import twitter4j.TwitterFactory;
+import twitter4j.conf.Configuration;
+import twitter4j.conf.ConfigurationBuilder;
-import com.google.appengine.api.labs.taskqueue.Queue;
-import com.google.appengine.api.labs.taskqueue.QueueFactory;
-import com.google.appengine.api.labs.taskqueue.TaskOptions.Method;
+import com.google.appengine.api.taskqueue.Queue;
+import com.google.appengine.api.taskqueue.QueueFactory;
+import com.google.appengine.api.taskqueue.TaskOptions.Builder;
+import com.google.appengine.api.taskqueue.TaskOptions.Method;
import com.google.appengine.repackaged.com.google.common.base.Splitter;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Maps;
@@ -77,8 +80,10 @@ public class GuiceServletConfig extends GuiceServletContextListener {
Set modules = ImmutableSet. of(googleModule);
// shared across all blobstores and used to retrieve tweets
try {
- twitterClient = new TwitterFactory().getInstance(props.getProperty("twitter.identity"), props
- .getProperty("twitter.credential"));
+ Configuration twitterConf = new ConfigurationBuilder()
+ .setUser(props.getProperty("twitter.identity"))
+ .setPassword(props.getProperty("twitter.credential")).build();
+ twitterClient = new TwitterFactory(twitterConf).getInstance();
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException("properties for twitter not configured properly in " + props.toString(), e);
}
@@ -96,7 +101,7 @@ public class GuiceServletConfig extends GuiceServletContextListener {
Queue queue = QueueFactory.getQueue("twitter");
// submit a job to store tweets for each configured blobstore
for (String name : providerTypeToBlobStoreMap.keySet()) {
- queue.add(url("/store/do").header("context", name).method(Method.GET));
+ queue.add(withUrl("/store/do").header("context", name).method(Method.GET));
}
super.contextInitialized(servletContextEvent);
diff --git a/demos/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java b/demos/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java
index 4f494b412b..7bda7b5d6b 100755
--- a/demos/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java
+++ b/demos/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java
@@ -48,6 +48,8 @@ import twitter4j.Status;
import twitter4j.Twitter;
import twitter4j.TwitterException;
import twitter4j.TwitterFactory;
+import twitter4j.conf.Configuration;
+import twitter4j.conf.ConfigurationBuilder;
import com.google.common.base.Joiner;
import com.google.common.base.Splitter;
@@ -98,8 +100,10 @@ public class TweetStoreLiveTest {
contexts.put(provider, factory.createContext(provider, wiring, props));
}
- Twitter client = new TwitterFactory().getInstance(props.getProperty("twitter.identity"),
- props.getProperty("twitter.credential"));
+ Configuration conf = new ConfigurationBuilder()
+ .setUser(props.getProperty("twitter.identity"))
+ .setPassword(props.getProperty("twitter.credential")).build();
+ Twitter client = new TwitterFactory(conf).getInstance();
StoreTweetsController controller = new StoreTweetsController(contexts, container, client);
ResponseList statuses = client.getMentions();