Updated Branches: refs/heads/master d604eee01 -> 1ff55b32c
Adds a maven pom for the rackspace examples. Run: mvn clean test -Dusername=username -Dapikey=key https://issues.apache.org/jira/browse/JCLOUDS-48 Project: http://git-wip-us.apache.org/repos/asf/incubator-jclouds-examples/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-jclouds-examples/commit/1ff55b32 Tree: http://git-wip-us.apache.org/repos/asf/incubator-jclouds-examples/tree/1ff55b32 Diff: http://git-wip-us.apache.org/repos/asf/incubator-jclouds-examples/diff/1ff55b32 Branch: refs/heads/master Commit: 1ff55b32cec5c33e90aae8ad443db9f87cf57dc5 Parents: d604eee Author: zack-shoylev <[email protected]> Authored: Tue May 14 16:06:40 2013 -0500 Committer: adriancole <[email protected]> Committed: Thu May 16 19:24:32 2013 -0700 ---------------------------------------------------------------------- rackspace/README.md | 39 ++++++++++++++++++++++++--------- rackspace/pom.xml | 52 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-jclouds-examples/blob/1ff55b32/rackspace/README.md ---------------------------------------------------------------------- diff --git a/rackspace/README.md b/rackspace/README.md index cbf7ccc..8777997 100644 --- a/rackspace/README.md +++ b/rackspace/README.md @@ -1,11 +1,19 @@ # Rackspace Examples Example code that uses jclouds to perform common tasks on the Rackspace Cloud. The class names are self explanatory and the code is well commented for you to follow along. +- [Requirements](#requirements) +- [Environment](#environment) +- [The Examples](#the-examples) +- [Command Line](#command-line) +- [Eclipse](#eclipse) +- [Next Steps](#next-steps) +- [Support and Feedback](#support-and-feedback) + ## Requirements 1. Username and API key for the Rackspace Cloud - See the [Getting Started guide](http://www.jclouds.org/documentation/quickstart/rackspace/). 1. Java Development Kit (JDK) version 6 or later - [Download](http://www.oracle.com/technetwork/java/javase/downloads/index.html). -1. Apache Ant - [Download](http://ant.apache.org/bindownload.cgi). +1. Apache Maven - [Maven in 5 Minutes](http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html). 1. Git - [Download](http://git-scm.com/downloads). ## Environment @@ -14,15 +22,11 @@ To setup an environment to compile and run the examples use these commands: ``` git clone https://github.com/jclouds/jclouds-examples.git cd jcloud-examples/rackspace/ -``` -Now follow the instructions for [Getting the binaries using Apache Ant](http://www.jclouds.org/documentation/userguide/installation-guide/). When you are done you should have a directory with the following files and sub-directories. - -``` $ pwd /Users/username/jclouds-examples/rackspace $ ls -build.xml maven-ant-tasks.jar README.md images/ lib/ src/ +pom.xml README.md images/ src/ ``` ## The Examples @@ -62,13 +66,28 @@ The [clouddns package](https://github.com/jclouds/jclouds-examples/tree/master/r ## Command Line -To run these examples from the command line use these commands: + +To download all dependencies, run: + +``` +mvn dependency:copy-dependencies "-DoutputDirectory=./lib" +``` + +If you also want to download the source jars, run: + +``` +mvn dependency:copy-dependencies "-DoutputDirectory=./lib" "-Dclassifier=sources" +``` + +To run individual examples from the command line use these commands: + +Note: If you're on Windows, the only change you need to make is to use a ';' instead of a ':' in the paths. ``` cd src/main/java/ javac -classpath ".:../../../lib/*:../resources/" org/jclouds/examples/rackspace/*.java - ``` + Every example class has a main method that takes your username as the first argument and your API key as the second argument. The one exception to this is the Authentication example that can take an optional third argument if you want to use your password for authentication. Try out an example. @@ -78,8 +97,6 @@ java -classpath ".:../../../lib/*:../resources/" org.jclouds.examples.rackspace. ``` Watch the terminal for output! -Note: If you're on Windows, the only change you need to make is to use a ';' instead of a ':' in the paths. - ## Eclipse To run these examples from Eclipse follow these instructions. @@ -117,7 +134,7 @@ Welcome to the jclouds [community](http://www.jclouds.org/documentation/communit ## Support and Feedback -Your feedback is appreciated! If you have specific issues with Rackspace support in jclouds, we'd prefer that you file an issue via [Github](https://github.com/jclouds/jclouds/issues). +Your feedback is appreciated! If you have specific issues with Rackspace support in jclouds, we'd prefer that you file an issue via [JIRA](https://issues.apache.org/jira/browse/JCLOUDS). For general feedback and support requests, send an email to: http://git-wip-us.apache.org/repos/asf/incubator-jclouds-examples/blob/1ff55b32/rackspace/pom.xml ---------------------------------------------------------------------- diff --git a/rackspace/pom.xml b/rackspace/pom.xml new file mode 100644 index 0000000..01e94fb --- /dev/null +++ b/rackspace/pom.xml @@ -0,0 +1,52 @@ +<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/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <properties> + <jclouds.version>1.6.0</jclouds.version> + </properties> + <groupId>org.jclouds.examples</groupId> + <artifactId>rackspace-examples</artifactId> + <version>0.0.1-SNAPSHOT</version> + <dependencies> + <dependency> + <groupId>org.jclouds.driver</groupId> + <artifactId>jclouds-slf4j</artifactId> + <version>${jclouds.version}</version> + </dependency> + <dependency> + <groupId>org.jclouds.driver</groupId> + <artifactId>jclouds-sshj</artifactId> + <version>${jclouds.version}</version> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <version>1.0.13</version> + </dependency> + <dependency> + <groupId>org.jclouds.provider</groupId> + <artifactId>rackspace-cloudservers-us</artifactId> + <version>${jclouds.version}</version> + </dependency> + <dependency> + <groupId>org.jclouds.provider</groupId> + <artifactId>cloudfiles-us</artifactId> + <version>${jclouds.version}</version> + </dependency> + <dependency> + <groupId>org.jclouds.provider</groupId> + <artifactId>rackspace-cloudblockstorage-us</artifactId> + <version>${jclouds.version}</version> + </dependency> + <dependency> + <groupId>org.jclouds.provider</groupId> + <artifactId>rackspace-clouddns-us</artifactId> + <version>${jclouds.version}</version> + </dependency> + <dependency> + <groupId>org.jclouds.provider</groupId> + <artifactId>rackspace-cloudloadbalancers-us</artifactId> + <version>${jclouds.version}</version> + </dependency> + </dependencies> +</project>
