Skip to content
Permalink
Browse files
Updated Rackspace examples to 1.6.1-incubating.
  • Loading branch information
Everett Toews committed Jun 21, 2013
1 parent a5dab70 commit 2cc8e3efb147bff4c17c8da6fde9d8aeb008d9ef
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
@@ -20,11 +20,10 @@ Example code that uses jclouds to perform common tasks on the Rackspace Cloud. T
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/
$ git clone https://github.com/jclouds/jclouds-examples.git
$ cd jcloud-examples/rackspace/
$ pwd
/Users/username/jclouds-examples/rackspace
$ ls
pom.xml README.md images/ src/
```
@@ -70,30 +69,30 @@ The [clouddns package](https://github.com/jclouds/jclouds-examples/tree/master/r
To download all dependencies, run:

```
mvn dependency:copy-dependencies "-DoutputDirectory=./lib"
$ mvn dependency:copy-dependencies "-DoutputDirectory=./lib"
```

If you also want to download the source jars, run:

```
mvn dependency:copy-dependencies "-DoutputDirectory=./lib" "-Dclassifier=sources"
$ 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
$ 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.

```
java -classpath ".:../../../lib/*:../resources/" org.jclouds.examples.rackspace.cloudservers.CreateServer myUsername myApiKey
$ java -classpath ".:../../../lib/*:../resources/" org.jclouds.examples.rackspace.cloudservers.CreateServer myUsername myApiKey
```
Watch the terminal for output!

@@ -22,19 +22,19 @@
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>
<jclouds.version>1.6.1-incubating</jclouds.version>
</properties>
<groupId>org.jclouds.examples</groupId>
<groupId>org.apache.jclouds.examples</groupId>
<artifactId>rackspace-examples</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>org.jclouds.driver</groupId>
<groupId>org.apache.jclouds.driver</groupId>
<artifactId>jclouds-slf4j</artifactId>
<version>${jclouds.version}</version>
</dependency>
<dependency>
<groupId>org.jclouds.driver</groupId>
<groupId>org.apache.jclouds.driver</groupId>
<artifactId>jclouds-sshj</artifactId>
<version>${jclouds.version}</version>
</dependency>
@@ -44,27 +44,27 @@
<version>1.0.13</version>
</dependency>
<dependency>
<groupId>org.jclouds.provider</groupId>
<groupId>org.apache.jclouds.provider</groupId>
<artifactId>rackspace-cloudservers-us</artifactId>
<version>${jclouds.version}</version>
</dependency>
<dependency>
<groupId>org.jclouds.provider</groupId>
<groupId>org.apache.jclouds.provider</groupId>
<artifactId>cloudfiles-us</artifactId>
<version>${jclouds.version}</version>
</dependency>
<dependency>
<groupId>org.jclouds.provider</groupId>
<groupId>org.apache.jclouds.provider</groupId>
<artifactId>rackspace-cloudblockstorage-us</artifactId>
<version>${jclouds.version}</version>
</dependency>
<dependency>
<groupId>org.jclouds.provider</groupId>
<groupId>org.apache.jclouds.provider</groupId>
<artifactId>rackspace-clouddns-us</artifactId>
<version>${jclouds.version}</version>
</dependency>
<dependency>
<groupId>org.jclouds.provider</groupId>
<groupId>org.apache.jclouds.provider</groupId>
<artifactId>rackspace-cloudloadbalancers-us</artifactId>
<version>${jclouds.version}</version>
</dependency>

0 comments on commit 2cc8e3e

Please sign in to comment.