diff --git a/demos/gae-tweetstore-spring/pom.xml b/demos/gae-tweetstore-spring/pom.xml index cf56a469e1..295952e1e2 100644 --- a/demos/gae-tweetstore-spring/pom.xml +++ b/demos/gae-tweetstore-spring/pom.xml @@ -62,26 +62,7 @@ ${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.provider aws-s3 diff --git a/demos/gae-tweetstore-spring/src/main/java/org/jclouds/demo/tweetstore/config/SpringServletConfig.java b/demos/gae-tweetstore-spring/src/main/java/org/jclouds/demo/tweetstore/config/SpringServletConfig.java index 2c1522578b..6ce634b061 100644 --- a/demos/gae-tweetstore-spring/src/main/java/org/jclouds/demo/tweetstore/config/SpringServletConfig.java +++ b/demos/gae-tweetstore-spring/src/main/java/org/jclouds/demo/tweetstore/config/SpringServletConfig.java @@ -51,6 +51,7 @@ import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; import twitter4j.Twitter; import twitter4j.TwitterFactory; +import twitter4j.conf.ConfigurationBuilder; import com.google.appengine.api.labs.taskqueue.Queue; import com.google.appengine.api.labs.taskqueue.QueueFactory; @@ -88,8 +89,10 @@ public class SpringServletConfig extends LoggingConfig implements ServletConfigA 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")); + twitter4j.conf.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); } diff --git a/demos/gae-tweetstore-spring/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java b/demos/gae-tweetstore-spring/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java index 5aa2ffe745..d3f43e7a02 100644 --- a/demos/gae-tweetstore-spring/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java +++ b/demos/gae-tweetstore-spring/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java @@ -47,6 +47,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 twitterConf = new ConfigurationBuilder() + .setUser(props.getProperty("twitter.identity")) + .setPassword(props.getProperty("twitter.credential")).build(); + Twitter client = new TwitterFactory(twitterConf).getInstance(); StoreTweetsController controller = new StoreTweetsController(contexts, container, client); ResponseList statuses = client.getMentions();