mirror of https://github.com/apache/jclouds.git
Ported gae-tweetstore to the 1.4.2 appengine API and to changed in Twitter4j
This commit is contained in:
parent
6c9ca419f6
commit
b07ca99372
|
@ -19,296 +19,304 @@
|
||||||
-->
|
-->
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.jclouds.demos</groupId>
|
<parent>
|
||||||
<artifactId>gae-replicator</artifactId>
|
<groupId>org.jclouds</groupId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<artifactId>jclouds-demos-project</artifactId>
|
||||||
<packaging>war</packaging>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<name>JClouds example to replicate the contents of a container</name>
|
</parent>
|
||||||
<description>JClouds example to replicate the contents of a container</description>
|
<artifactId>jclouds-demo-gae-tweetstore</artifactId>
|
||||||
|
<packaging>war</packaging>
|
||||||
|
<name>JClouds TweetStore for Google App Engine</name>
|
||||||
|
<description>JClouds TweetStore for Google App Engine using Guice for Dependency Injection</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<!--
|
<!--
|
||||||
note you must set the property ${appengine.home} to a valid
|
note you must set the property ${appengine.home} to a valid
|
||||||
extraction of appengine-java-sdk
|
extraction of appengine-java-sdk
|
||||||
-->
|
-->
|
||||||
<appengine.home>YOUR_APPENGINE_HOME</appengine.home>
|
<appengine.applicationid>jclouds-replicate</appengine.applicationid>
|
||||||
<appengine.applicationid>jclouds-replicate</appengine.applicationid>
|
<appengine.sdk.version>1.4.2</appengine.sdk.version>
|
||||||
<devappserver.address>localhost</devappserver.address>
|
<devappserver.address>localhost</devappserver.address>
|
||||||
<devappserver.port>8088</devappserver.port>
|
<devappserver.port>8088</devappserver.port>
|
||||||
<jclouds.replicate.source>googlestorage</jclouds.replicate.source>
|
<jclouds.replicate.source>googlestorage</jclouds.replicate.source>
|
||||||
<jclouds.replicate.destinations>cloudfiles-us,aws-s3,azureblob</jclouds.replicate.destinations>
|
<jclouds.replicate.destinations>cloudfiles-us,aws-s3,azureblob</jclouds.replicate.destinations>
|
||||||
<jclouds.replicate.container>jclouds-replicate</jclouds.replicate.container>
|
<jclouds.replicate.container>jclouds-replicate</jclouds.replicate.container>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${project.groupId}</groupId>
|
<groupId>${project.groupId}</groupId>
|
||||||
<artifactId>jclouds-allblobstore</artifactId>
|
<artifactId>jclouds-blobstore</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${project.groupId}</groupId>
|
<groupId>org.twitter4j</groupId>
|
||||||
<artifactId>jclouds-blobstore</artifactId>
|
<artifactId>twitter4j-core</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>[2.1,)</version>
|
||||||
<type>test-jar</type>
|
</dependency>
|
||||||
<scope>test</scope>
|
<dependency>
|
||||||
</dependency>
|
<groupId>${project.groupId}</groupId>
|
||||||
<dependency>
|
<artifactId>jclouds-blobstore</artifactId>
|
||||||
<groupId>${project.groupId}</groupId>
|
<version>${project.version}</version>
|
||||||
<artifactId>jclouds-core</artifactId>
|
<type>test-jar</type>
|
||||||
<version>${project.version}</version>
|
<scope>test</scope>
|
||||||
<type>test-jar</type>
|
</dependency>
|
||||||
<scope>test</scope>
|
<dependency>
|
||||||
</dependency>
|
<groupId>org.jclouds.provider</groupId>
|
||||||
<dependency>
|
<artifactId>aws-s3</artifactId>
|
||||||
<groupId>org.jclouds.driver</groupId>
|
<version>${project.version}</version>
|
||||||
<artifactId>jclouds-log4j</artifactId>
|
</dependency>
|
||||||
<version>${project.version}</version>
|
<dependency>
|
||||||
<scope>test</scope>
|
<groupId>${project.groupId}</groupId>
|
||||||
</dependency>
|
<artifactId>jclouds-atmos</artifactId>
|
||||||
<dependency>
|
<version>${project.version}</version>
|
||||||
<groupId>log4j</groupId>
|
</dependency>
|
||||||
<artifactId>log4j</artifactId>
|
<dependency>
|
||||||
<version>1.2.16</version>
|
<groupId>${project.groupId}</groupId>
|
||||||
<scope>test</scope>
|
<artifactId>jclouds-azure</artifactId>
|
||||||
</dependency>
|
<version>${project.version}</version>
|
||||||
<dependency>
|
</dependency>
|
||||||
<groupId>org.jclouds.driver</groupId>
|
<dependency>
|
||||||
<artifactId>gae</artifactId>
|
<groupId>${project.groupId}</groupId>
|
||||||
<version>${project.version}</version>
|
<artifactId>jclouds-rackspace</artifactId>
|
||||||
</dependency>
|
<version>${project.version}</version>
|
||||||
<dependency>
|
</dependency>
|
||||||
<groupId>com.google.inject.extensions</groupId>
|
<dependency>
|
||||||
<artifactId>guice-servlet</artifactId>
|
<groupId>org.jclouds.driver</groupId>
|
||||||
<version>3.0</version>
|
<artifactId>jclouds-gae</artifactId>
|
||||||
</dependency>
|
<version>${project.version}</version>
|
||||||
<dependency>
|
</dependency>
|
||||||
<groupId>displaytag</groupId>
|
<dependency>
|
||||||
<artifactId>displaytag</artifactId>
|
<groupId>com.google.inject.extensions</groupId>
|
||||||
<version>1.2</version>
|
<artifactId>guice-servlet</artifactId>
|
||||||
<exclusions>
|
<version>3.0</version>
|
||||||
<exclusion>
|
</dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<dependency>
|
||||||
<artifactId>slf4j-log4j12</artifactId>
|
<groupId>displaytag</groupId>
|
||||||
</exclusion>
|
<artifactId>displaytag</artifactId>
|
||||||
</exclusions>
|
<version>1.2</version>
|
||||||
</dependency>
|
<exclusions>
|
||||||
<dependency>
|
<exclusion>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>slf4j-jdk14</artifactId>
|
<artifactId>slf4j-log4j12</artifactId>
|
||||||
<version>1.5.6</version>
|
</exclusion>
|
||||||
</dependency>
|
</exclusions>
|
||||||
<dependency>
|
</dependency>
|
||||||
<artifactId>standard</artifactId>
|
<dependency>
|
||||||
<groupId>taglibs</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<version>1.1.2</version>
|
<artifactId>slf4j-jdk14</artifactId>
|
||||||
<scope>runtime</scope>
|
<version>1.5.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<artifactId>jstl</artifactId>
|
<artifactId>jstl</artifactId>
|
||||||
<groupId>javax.servlet</groupId>
|
<groupId>javax.servlet</groupId>
|
||||||
<version>1.1.2</version>
|
<version>1.1.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<artifactId>standard</artifactId>
|
||||||
|
<groupId>taglibs</groupId>
|
||||||
|
<version>1.1.2</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>servlet-api</artifactId>
|
||||||
|
<version>2.5</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Google App Engine API -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.appengine</groupId>
|
||||||
|
<artifactId>appengine-api-1.0-sdk</artifactId>
|
||||||
|
<version>${appengine.sdk.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.appengine</groupId>
|
||||||
|
<artifactId>appengine-tools-sdk</artifactId>
|
||||||
|
<version>${appengine.sdk.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- Google App Engine API -->
|
<!-- Google App Engine Runtime Dependencies -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.appengine</groupId>
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
<artifactId>appengine-api-1.0-sdk</artifactId>
|
<artifactId>geronimo-jta_1.1_spec</artifactId>
|
||||||
<version>1.4.2</version>
|
<version>1.1.1</version>
|
||||||
</dependency>
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
|
<artifactId>geronimo-jpa_3.0_spec</artifactId>
|
||||||
|
<version>1.1.1</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.appengine.orm</groupId>
|
||||||
|
<artifactId>jdo2-api</artifactId>
|
||||||
|
<version>2.3-eb</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.datanucleus</groupId>
|
||||||
|
<artifactId>datanucleus-core</artifactId>
|
||||||
|
<version>1.1.5</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.appengine.orm</groupId>
|
||||||
|
<artifactId>datanucleus-appengine</artifactId>
|
||||||
|
<version>1.0.8</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.datanucleus</groupId>
|
||||||
|
<artifactId>datanucleus-jpa</artifactId>
|
||||||
|
<version>1.1.5</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<webResources>
|
||||||
|
<resource>
|
||||||
|
<directory>src/main/appengine</directory>
|
||||||
|
<targetPath>WEB-INF/</targetPath>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</resource>
|
||||||
|
</webResources>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>integration</id>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>test</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<systemProperties>
|
||||||
|
<property>
|
||||||
|
<name>appengine.home</name>
|
||||||
|
<value>${appengine.home}</value>
|
||||||
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>devappserver.address</name>
|
||||||
|
<value>${devappserver.address}</value>
|
||||||
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>devappserver.port</name>
|
||||||
|
<value>${devappserver.port}</value>
|
||||||
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>warfile</name>
|
||||||
|
<value>${project.build.directory}/${project.artifactId}</value>
|
||||||
|
</property>
|
||||||
|
</systemProperties>
|
||||||
|
<additionalClasspathElements>
|
||||||
|
<additionalClasspathElement>${appengine.home}/lib/appengine-tools-api.jar</additionalClasspathElement>
|
||||||
|
</additionalClasspathElements>
|
||||||
|
<environmentVariables>
|
||||||
|
<DEBUG>true</DEBUG>
|
||||||
|
<SDK_BIN>${appengine.home}/bin</SDK_BIN>
|
||||||
|
<SDK_LIB>${appengine.home}/lib</SDK_LIB>
|
||||||
|
<SDK_CONFIG>${appengine.home}/config/sdk</SDK_CONFIG>
|
||||||
|
</environmentVariables>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
<!-- Google App Engine Runtime Dependencies -->
|
<profiles>
|
||||||
<dependency>
|
<profile>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<id>live</id>
|
||||||
<artifactId>geronimo-jta_1.1_spec</artifactId>
|
<build>
|
||||||
<version>1.1.1</version>
|
<plugins>
|
||||||
<scope>runtime</scope>
|
<plugin>
|
||||||
</dependency>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
<dependency>
|
<execution>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<id>integration</id>
|
||||||
<artifactId>geronimo-jpa_3.0_spec</artifactId>
|
<phase>integration-test</phase>
|
||||||
<version>1.1.1</version>
|
<goals>
|
||||||
<scope>runtime</scope>
|
<goal>test</goal>
|
||||||
</dependency>
|
</goals>
|
||||||
|
<configuration>
|
||||||
<dependency>
|
<systemProperties>
|
||||||
<groupId>com.google.appengine.orm</groupId>
|
<property>
|
||||||
<artifactId>jdo2-api</artifactId>
|
<name>test.azureblob.identity</name>
|
||||||
<version>2.3-eb</version>
|
<value>${test.azureblob.identity}</value>
|
||||||
<scope>runtime</scope>
|
</property>
|
||||||
</dependency>
|
<property>
|
||||||
|
<name>test.azureblob.credential</name>
|
||||||
<dependency>
|
<value>${test.azureblob.credential}</value>
|
||||||
<groupId>org.datanucleus</groupId>
|
</property>
|
||||||
<artifactId>datanucleus-core</artifactId>
|
<property>
|
||||||
<version>1.1.5</version>
|
<name>test.cloudfiles-us.identity</name>
|
||||||
</dependency>
|
<value>${test.cloudfiles-us.identity}</value>
|
||||||
|
</property>
|
||||||
<dependency>
|
<property>
|
||||||
<groupId>com.google.appengine.orm</groupId>
|
<name>test.cloudfiles-us.credential</name>
|
||||||
<artifactId>datanucleus-appengine</artifactId>
|
<value>${test.cloudfiles-us.credential}</value>
|
||||||
<version>1.0.8</version>
|
</property>
|
||||||
<scope>runtime</scope>
|
<property>
|
||||||
</dependency>
|
<name>test.aws-s3.identity</name>
|
||||||
|
<value>${test.aws-s3.identity}</value>
|
||||||
<dependency>
|
</property>
|
||||||
<groupId>org.datanucleus</groupId>
|
<property>
|
||||||
<artifactId>datanucleus-jpa</artifactId>
|
<name>test.aws-s3.credential</name>
|
||||||
<version>1.1.5</version>
|
<value>${test.aws-s3.credential}</value>
|
||||||
<scope>runtime</scope>
|
</property>
|
||||||
</dependency>
|
<property>
|
||||||
|
<name>test.googlestorage.identity</name>
|
||||||
<!-- App Engine Runtime Dependencies-->
|
<value>${test.googlestorage.identity}</value>
|
||||||
<dependency>
|
</property>
|
||||||
<groupId>com.google.appengine</groupId>
|
<property>
|
||||||
<artifactId>appengine-tools-sdk</artifactId>
|
<name>test.googlestorage.credential</name>
|
||||||
<version>1.4.2</version>
|
<value>${test.googlestorage.credential}</value>
|
||||||
</dependency>
|
</property>
|
||||||
</dependencies>
|
<property>
|
||||||
<build>
|
<name>appengine.home</name>
|
||||||
<finalName>${project.artifactId}</finalName>
|
<value>${appengine.home}</value>
|
||||||
<plugins>
|
</property>
|
||||||
<plugin>
|
<property>
|
||||||
<artifactId>maven-war-plugin</artifactId>
|
<name>devappserver.address</name>
|
||||||
<configuration>
|
<value>${devappserver.address}</value>
|
||||||
<webResources>
|
</property>
|
||||||
<resource>
|
<property>
|
||||||
<directory>src/main/appengine</directory>
|
<name>devappserver.port</name>
|
||||||
<targetPath>WEB-INF/</targetPath>
|
<value>${devappserver.port}</value>
|
||||||
<filtering>true</filtering>
|
</property>
|
||||||
</resource>
|
<property>
|
||||||
</webResources>
|
<name>jclouds.replicate.source</name>
|
||||||
</configuration>
|
<value>${jclouds.replicate.source}</value>
|
||||||
</plugin>
|
</property>
|
||||||
<plugin>
|
<property>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<name>jclouds.replicate.destinations</name>
|
||||||
<executions>
|
<value>${jclouds.replicate.destinations}</value>
|
||||||
<execution>
|
</property>
|
||||||
<id>integration</id>
|
<property>
|
||||||
<phase>integration-test</phase>
|
<name>jclouds.replicate.container</name>
|
||||||
<goals>
|
<value>${jclouds.replicate.container}</value>
|
||||||
<goal>test</goal>
|
</property>
|
||||||
</goals>
|
<property>
|
||||||
<configuration>
|
<name>warfile</name>
|
||||||
<systemProperties>
|
<value>${project.build.directory}/${project.artifactId}</value>
|
||||||
<property>
|
</property>
|
||||||
<name>appengine.home</name>
|
</systemProperties>
|
||||||
<value>${appengine.home}</value>
|
</configuration>
|
||||||
</property>
|
</execution>
|
||||||
<property>
|
</executions>
|
||||||
<name>devappserver.address</name>
|
</plugin>
|
||||||
<value>${devappserver.address}</value>
|
</plugins>
|
||||||
</property>
|
</build>
|
||||||
<property>
|
</profile>
|
||||||
<name>devappserver.port</name>
|
</profiles>
|
||||||
<value>${devappserver.port}</value>
|
|
||||||
</property>
|
|
||||||
<property>
|
|
||||||
<name>warfile</name>
|
|
||||||
<value>${project.build.directory}/${project.artifactId}</value>
|
|
||||||
</property>
|
|
||||||
</systemProperties>
|
|
||||||
<additionalClasspathElements>
|
|
||||||
<additionalClasspathElement>${appengine.home}/lib/appengine-tools-api.jar</additionalClasspathElement>
|
|
||||||
</additionalClasspathElements>
|
|
||||||
<environmentVariables>
|
|
||||||
<DEBUG>true</DEBUG>
|
|
||||||
<SDK_BIN>${appengine.home}/bin</SDK_BIN>
|
|
||||||
<SDK_LIB>${appengine.home}/lib</SDK_LIB>
|
|
||||||
<SDK_CONFIG>${appengine.home}/config/sdk</SDK_CONFIG>
|
|
||||||
</environmentVariables>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
<profiles>
|
|
||||||
<profile>
|
|
||||||
<id>live</id>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>integration</id>
|
|
||||||
<phase>integration-test</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>test</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<systemProperties>
|
|
||||||
<property>
|
|
||||||
<name>test.azureblob.identity</name>
|
|
||||||
<value>${test.azureblob.identity}</value>
|
|
||||||
</property>
|
|
||||||
<property>
|
|
||||||
<name>test.azureblob.credential</name>
|
|
||||||
<value>${test.azureblob.credential}</value>
|
|
||||||
</property>
|
|
||||||
<property>
|
|
||||||
<name>test.cloudfiles-us.identity</name>
|
|
||||||
<value>${test.cloudfiles-us.identity}</value>
|
|
||||||
</property>
|
|
||||||
<property>
|
|
||||||
<name>test.cloudfiles-us.credential</name>
|
|
||||||
<value>${test.cloudfiles-us.credential}</value>
|
|
||||||
</property>
|
|
||||||
<property>
|
|
||||||
<name>test.aws-s3.identity</name>
|
|
||||||
<value>${test.aws-s3.identity}</value>
|
|
||||||
</property>
|
|
||||||
<property>
|
|
||||||
<name>test.aws-s3.credential</name>
|
|
||||||
<value>${test.aws-s3.credential}</value>
|
|
||||||
</property>
|
|
||||||
<property>
|
|
||||||
<name>test.googlestorage.identity</name>
|
|
||||||
<value>${test.googlestorage.identity}</value>
|
|
||||||
</property>
|
|
||||||
<property>
|
|
||||||
<name>test.googlestorage.credential</name>
|
|
||||||
<value>${test.googlestorage.credential}</value>
|
|
||||||
</property>
|
|
||||||
<property>
|
|
||||||
<name>appengine.home</name>
|
|
||||||
<value>${appengine.home}</value>
|
|
||||||
</property>
|
|
||||||
<property>
|
|
||||||
<name>devappserver.address</name>
|
|
||||||
<value>${devappserver.address}</value>
|
|
||||||
</property>
|
|
||||||
<property>
|
|
||||||
<name>devappserver.port</name>
|
|
||||||
<value>${devappserver.port}</value>
|
|
||||||
</property>
|
|
||||||
<property>
|
|
||||||
<name>jclouds.replicate.source</name>
|
|
||||||
<value>${jclouds.replicate.source}</value>
|
|
||||||
</property>
|
|
||||||
<property>
|
|
||||||
<name>jclouds.replicate.destinations</name>
|
|
||||||
<value>${jclouds.replicate.destinations}</value>
|
|
||||||
</property>
|
|
||||||
<property>
|
|
||||||
<name>jclouds.replicate.container</name>
|
|
||||||
<value>${jclouds.replicate.container}</value>
|
|
||||||
</property>
|
|
||||||
<property>
|
|
||||||
<name>warfile</name>
|
|
||||||
<value>${project.build.directory}/${project.artifactId}</value>
|
|
||||||
</property>
|
|
||||||
</systemProperties>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
package org.jclouds.demo.tweetstore.config;
|
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 com.google.common.base.Preconditions.checkNotNull;
|
||||||
import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_CONTAINER;
|
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.Twitter;
|
||||||
import twitter4j.TwitterFactory;
|
import twitter4j.TwitterFactory;
|
||||||
|
import twitter4j.conf.Configuration;
|
||||||
|
import twitter4j.conf.ConfigurationBuilder;
|
||||||
|
|
||||||
import com.google.appengine.api.labs.taskqueue.Queue;
|
import com.google.appengine.api.taskqueue.Queue;
|
||||||
import com.google.appengine.api.labs.taskqueue.QueueFactory;
|
import com.google.appengine.api.taskqueue.QueueFactory;
|
||||||
import com.google.appengine.api.labs.taskqueue.TaskOptions.Method;
|
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.appengine.repackaged.com.google.common.base.Splitter;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
@ -77,8 +80,10 @@ public class GuiceServletConfig extends GuiceServletContextListener {
|
||||||
Set<Module> modules = ImmutableSet.<Module> of(googleModule);
|
Set<Module> modules = ImmutableSet.<Module> of(googleModule);
|
||||||
// shared across all blobstores and used to retrieve tweets
|
// shared across all blobstores and used to retrieve tweets
|
||||||
try {
|
try {
|
||||||
twitterClient = new TwitterFactory().getInstance(props.getProperty("twitter.identity"), props
|
Configuration twitterConf = new ConfigurationBuilder()
|
||||||
.getProperty("twitter.credential"));
|
.setUser(props.getProperty("twitter.identity"))
|
||||||
|
.setPassword(props.getProperty("twitter.credential")).build();
|
||||||
|
twitterClient = new TwitterFactory(twitterConf).getInstance();
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
throw new IllegalArgumentException("properties for twitter not configured properly in " + props.toString(), 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");
|
Queue queue = QueueFactory.getQueue("twitter");
|
||||||
// submit a job to store tweets for each configured blobstore
|
// submit a job to store tweets for each configured blobstore
|
||||||
for (String name : providerTypeToBlobStoreMap.keySet()) {
|
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);
|
super.contextInitialized(servletContextEvent);
|
||||||
|
|
|
@ -48,6 +48,8 @@ import twitter4j.Status;
|
||||||
import twitter4j.Twitter;
|
import twitter4j.Twitter;
|
||||||
import twitter4j.TwitterException;
|
import twitter4j.TwitterException;
|
||||||
import twitter4j.TwitterFactory;
|
import twitter4j.TwitterFactory;
|
||||||
|
import twitter4j.conf.Configuration;
|
||||||
|
import twitter4j.conf.ConfigurationBuilder;
|
||||||
|
|
||||||
import com.google.common.base.Joiner;
|
import com.google.common.base.Joiner;
|
||||||
import com.google.common.base.Splitter;
|
import com.google.common.base.Splitter;
|
||||||
|
@ -98,8 +100,10 @@ public class TweetStoreLiveTest {
|
||||||
contexts.put(provider, factory.createContext(provider, wiring, props));
|
contexts.put(provider, factory.createContext(provider, wiring, props));
|
||||||
}
|
}
|
||||||
|
|
||||||
Twitter client = new TwitterFactory().getInstance(props.getProperty("twitter.identity"),
|
Configuration conf = new ConfigurationBuilder()
|
||||||
props.getProperty("twitter.credential"));
|
.setUser(props.getProperty("twitter.identity"))
|
||||||
|
.setPassword(props.getProperty("twitter.credential")).build();
|
||||||
|
Twitter client = new TwitterFactory(conf).getInstance();
|
||||||
StoreTweetsController controller = new StoreTweetsController(contexts, container, client);
|
StoreTweetsController controller = new StoreTweetsController(contexts, container, client);
|
||||||
|
|
||||||
ResponseList<Status> statuses = client.getMentions();
|
ResponseList<Status> statuses = client.getMentions();
|
||||||
|
|
Loading…
Reference in New Issue