From 3f60d4f707fe953563249e2006355527b82b5e1f Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Thu, 2 Jun 2011 02:13:57 +0200 Subject: [PATCH 1/3] Extracted a PROPERTY_TWEETSTORE_BLOBSTORES constant --- .../tweetstore/reference/TweetStoreConstants.java | 13 +++++++------ .../tweetstore/integration/TweetStoreLiveTest.java | 3 ++- .../tweetstore/reference/TweetStoreConstants.java | 5 +++-- .../tweetstore/integration/TweetStoreLiveTest.java | 3 ++- .../tweetstore/reference/TweetStoreConstants.java | 13 +++++++------ .../tweetstore/integration/TweetStoreLiveTest.java | 3 ++- 6 files changed, 23 insertions(+), 17 deletions(-) diff --git a/demos/tweetstore/gae-tweetstore-spring/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java b/demos/tweetstore/gae-tweetstore-spring/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java index 4e75d5a7fa..8cdceeb27d 100644 --- a/demos/tweetstore/gae-tweetstore-spring/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java +++ b/demos/tweetstore/gae-tweetstore-spring/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java @@ -24,10 +24,11 @@ package org.jclouds.demo.tweetstore.reference; * @author Adrian Cole */ public interface TweetStoreConstants { - public static final String PROPERTY_TWEETSTORE_CONTAINER = "jclouds.tweetstore.container"; - /** - * Note that this has to conform to restrictions of all blobstores. for example, azure doesn't - * support periods. - */ - public static final String SENDER_NAME = "sendername"; + static final String PROPERTY_TWEETSTORE_BLOBSTORES = "jclouds.tweetstore.blobstores"; + static final String PROPERTY_TWEETSTORE_CONTAINER = "jclouds.tweetstore.container"; + /** + * Note that this has to conform to restrictions of all blobstores. for + * example, azure doesn't support periods. + */ + static final String SENDER_NAME = "sendername"; } diff --git a/demos/tweetstore/gae-tweetstore-spring/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java b/demos/tweetstore/gae-tweetstore-spring/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java index 6463f73d13..3565071db8 100644 --- a/demos/tweetstore/gae-tweetstore-spring/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java +++ b/demos/tweetstore/gae-tweetstore-spring/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java @@ -19,6 +19,7 @@ package org.jclouds.demo.tweetstore.integration; import static com.google.common.base.Preconditions.checkNotNull; +import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_BLOBSTORES; import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_CONTAINER; import java.io.IOException; @@ -71,7 +72,7 @@ public class TweetStoreLiveTest { private String container; private static final Iterable blobstores = - Splitter.on(',').split(System.getProperty("jclouds.tweetstore.blobstores", + Splitter.on(',').split(System.getProperty(PROPERTY_TWEETSTORE_BLOBSTORES, "cloudfiles-us,aws-s3,azureblob")); private static final Properties props = new Properties(); diff --git a/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java b/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java index 4e75d5a7fa..4d2eb6b410 100644 --- a/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java +++ b/demos/tweetstore/gae-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java @@ -24,10 +24,11 @@ package org.jclouds.demo.tweetstore.reference; * @author Adrian Cole */ public interface TweetStoreConstants { - public static final String PROPERTY_TWEETSTORE_CONTAINER = "jclouds.tweetstore.container"; + static final String PROPERTY_TWEETSTORE_BLOBSTORES = "jclouds.tweetstore.blobstores"; + static final String PROPERTY_TWEETSTORE_CONTAINER = "jclouds.tweetstore.container"; /** * Note that this has to conform to restrictions of all blobstores. for example, azure doesn't * support periods. */ - public static final String SENDER_NAME = "sendername"; + static final String SENDER_NAME = "sendername"; } diff --git a/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java b/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java index ac96008c49..a2d982a7ae 100644 --- a/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java +++ b/demos/tweetstore/gae-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java @@ -19,6 +19,7 @@ package org.jclouds.demo.tweetstore.integration; import static com.google.common.base.Preconditions.checkNotNull; +import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_BLOBSTORES; import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_CONTAINER; import java.io.IOException; @@ -70,7 +71,7 @@ public class TweetStoreLiveTest { private Map contexts; private String container; private static final Iterable blobstores = - Splitter.on(',').split(System.getProperty("jclouds.tweetstore.blobstores", + Splitter.on(',').split(System.getProperty(PROPERTY_TWEETSTORE_BLOBSTORES, "cloudfiles-us,aws-s3,azureblob")); private static final Properties props = new Properties(); diff --git a/demos/tweetstore/runatcloud-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java b/demos/tweetstore/runatcloud-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java index 4e75d5a7fa..8cdceeb27d 100644 --- a/demos/tweetstore/runatcloud-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java +++ b/demos/tweetstore/runatcloud-tweetstore/src/main/java/org/jclouds/demo/tweetstore/reference/TweetStoreConstants.java @@ -24,10 +24,11 @@ package org.jclouds.demo.tweetstore.reference; * @author Adrian Cole */ public interface TweetStoreConstants { - public static final String PROPERTY_TWEETSTORE_CONTAINER = "jclouds.tweetstore.container"; - /** - * Note that this has to conform to restrictions of all blobstores. for example, azure doesn't - * support periods. - */ - public static final String SENDER_NAME = "sendername"; + static final String PROPERTY_TWEETSTORE_BLOBSTORES = "jclouds.tweetstore.blobstores"; + static final String PROPERTY_TWEETSTORE_CONTAINER = "jclouds.tweetstore.container"; + /** + * Note that this has to conform to restrictions of all blobstores. for + * example, azure doesn't support periods. + */ + static final String SENDER_NAME = "sendername"; } diff --git a/demos/tweetstore/runatcloud-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java b/demos/tweetstore/runatcloud-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java index d3830df2a2..f0a837be91 100644 --- a/demos/tweetstore/runatcloud-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java +++ b/demos/tweetstore/runatcloud-tweetstore/src/test/java/org/jclouds/demo/tweetstore/integration/TweetStoreLiveTest.java @@ -19,6 +19,7 @@ package org.jclouds.demo.tweetstore.integration; import static com.google.common.base.Preconditions.checkNotNull; +import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_BLOBSTORES; import static org.jclouds.demo.tweetstore.reference.TweetStoreConstants.PROPERTY_TWEETSTORE_CONTAINER; import java.io.IOException; @@ -71,7 +72,7 @@ public class TweetStoreLiveTest { private Map contexts; private String container; private static final Iterable blobstores = - Splitter.on(',').split(System.getProperty("jclouds.tweetstore.blobstores", + Splitter.on(',').split(System.getProperty(PROPERTY_TWEETSTORE_BLOBSTORES, "cloudfiles-us,aws-s3,azureblob")); private static final Properties props = new Properties(); From a089151981e3b3d70c618608d0513e0e597a3348 Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Thu, 2 Jun 2011 02:15:05 +0200 Subject: [PATCH 2/3] Added a 'deploy' profile that fetches and includes a private jclouds.properties file, and now copying META-INF resources into /META-INF rather than /WEB-INF/META-INF --- demos/tweetstore/pom.xml | 70 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/demos/tweetstore/pom.xml b/demos/tweetstore/pom.xml index 25940bb504..404c2441a6 100644 --- a/demos/tweetstore/pom.xml +++ b/demos/tweetstore/pom.xml @@ -37,6 +37,7 @@ + target/maven-shared-archive-resources cloudfiles-us,aws-s3,azureblob @@ -117,6 +118,14 @@ ${project.artifactId} + + maven-remote-resources-plugin + 1.2 + + + false + + maven-war-plugin 2.1.1 @@ -129,9 +138,70 @@ WEB-INF true + + ${remoteResourcesDirectory}/META-INF + META-INF + + + + + deploy + + + + maven-remote-resources-plugin + 1.2 + + + false + + + + include-jclouds-properties + + process + + + + org.jclouds:jclouds-properties:${project.version} + + + + + + + maven-war-plugin + + + WEB-INF/web.xml + + + src/main/platform + WEB-INF + true + + + ${remoteResourcesDirectory}/META-INF + META-INF + + + ${remoteResourcesDirectory} + WEB-INF + true + + jclouds.properties + + + + + + + + + From b1fb4f686a7229e0fc84037d487b82d91fad8b4a Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Thu, 2 Jun 2011 02:17:25 +0200 Subject: [PATCH 3/3] Added 'deploy' profiles for each TweetStore instance --- .../tweetstore/gae-tweetstore-spring/pom.xml | 17 ++++++ demos/tweetstore/gae-tweetstore/pom.xml | 17 ++++++ .../tweetstore/runatcloud-tweetstore/pom.xml | 53 +++++++++++-------- 3 files changed, 64 insertions(+), 23 deletions(-) diff --git a/demos/tweetstore/gae-tweetstore-spring/pom.xml b/demos/tweetstore/gae-tweetstore-spring/pom.xml index 5f4e9deb31..229e937bcc 100644 --- a/demos/tweetstore/gae-tweetstore-spring/pom.xml +++ b/demos/tweetstore/gae-tweetstore-spring/pom.xml @@ -206,5 +206,22 @@ + + + deploy + + + + net.kindleit + maven-gae-plugin + 0.8.4 + + google-appengine + ${appengine.sdk.root} + + + + + diff --git a/demos/tweetstore/gae-tweetstore/pom.xml b/demos/tweetstore/gae-tweetstore/pom.xml index bd621e8377..77042cfd5a 100644 --- a/demos/tweetstore/gae-tweetstore/pom.xml +++ b/demos/tweetstore/gae-tweetstore/pom.xml @@ -192,5 +192,22 @@ + + + deploy + + + + net.kindleit + maven-gae-plugin + 0.8.4 + + google-appengine + ${appengine.sdk.root} + + + + + diff --git a/demos/tweetstore/runatcloud-tweetstore/pom.xml b/demos/tweetstore/runatcloud-tweetstore/pom.xml index b7f66e4abe..913462f58e 100644 --- a/demos/tweetstore/runatcloud-tweetstore/pom.xml +++ b/demos/tweetstore/runatcloud-tweetstore/pom.xml @@ -54,19 +54,6 @@ - - - bees-plugins-snapshots - http://repository-cloudbees.forge.cloudbees.com/public-snapshot/ - - false - - - true - - - - @@ -105,16 +92,6 @@ - - com.cloudbees - bees-maven-plugin - 1.0-SNAPSHOT - - ${bees.environment} - ${bees.apikey} - ${bees.secret} - - @@ -210,5 +187,35 @@ + + + deploy + + + bees-plugins-snapshots + http://repository-cloudbees.forge.cloudbees.com/public-snapshot + + false + + + true + + + + + + + com.cloudbees + bees-maven-plugin + 1.0-SNAPSHOT + + ${bees.environment} + ${bees.apikey} + ${bees.secret} + + + + +