You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2016/02/09 21:27:38 UTC

[19/34] usergrid git commit: Bring in docs and website from master.

Bring in docs and website from master.


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/5ed3d753
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/5ed3d753
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/5ed3d753

Branch: refs/heads/asf-site
Commit: 5ed3d753107125d24a7666225d176ed4464d3fe0
Parents: df4b685
Author: Dave Johnson <sn...@apache.org>
Authored: Thu Feb 4 10:48:20 2016 -0800
Committer: Dave Johnson <sn...@apache.org>
Committed: Thu Feb 4 10:48:20 2016 -0800

----------------------------------------------------------------------
 docs/data-queries/operators-and-types.md        |    25 +-
 docs/installation/ug2-deploy-to-tomcat.md       |    44 +-
 docs/jersey2skeleton/README.md                  |     9 +
 docs/jersey2skeleton/pom.xml                    |   387 +
 .../usergrid/testapp/AbstractResource.java      |    51 +
 .../apache/usergrid/testapp/ApiResponse.java    |    52 +
 .../org/apache/usergrid/testapp/Entity.java     |    55 +
 .../usergrid/testapp/ManagementResource.java    |    56 +
 .../usergrid/testapp/OrganizationResource.java  |    64 +
 .../usergrid/testapp/OrganizationsResource.java |    76 +
 .../apache/usergrid/testapp/StatusResource.java |    34 +
 .../java/org/apache/usergrid/testapp/User.java  |    28 +
 .../src/main/resources/applicationContext.xml   |    28 +
 .../main/resources/jersey2skeleton-context.xml  |    28 +
 .../src/main/webapp/WEB-INF/web.xml             |    95 +
 .../usergrid/testapp/AvailablePortFinder.java   |   208 +
 .../usergrid/testapp/OrganizationTest.java      |   127 +
 .../org/apache/usergrid/testapp/TomcatMain.java |    57 +
 .../apache/usergrid/testapp/TomcatRuntime.java  |   185 +
 .../src/test/resources/log4j.properties         |    31 +
 .../src/test/resources/logging.properties       |    26 +
 docs/jersey2skeleton/templates/markdown.hbs     |   108 +
 docs/jersey2skeleton/templates/operation.hbs    |    73 +
 docs/jersey2skeleton/templates/security.hbs     |    88 +
 .../templates/strapdown.html.hbs                |    10 +
 docs/rest-endpoints/api-docs.html               |   750 +-
 docs/rest-endpoints/api-docs.md                 |   142 +-
 website/README.md                               |     3 +-
 website/Rules                                   |    52 +
 website/build.sh                                |     1 +
 website/content/bootstrap/bootstrap.min.css     |     9 +
 website/content/community/index.html            |    22 +-
 website/content/css/bootflat-extensions.css     |   356 +
 website/content/css/bootflat-square.css         |    69 +
 website/content/css/bootflat.css                |  1560 +
 website/content/css/font-awesome.min.css        |   405 +
 website/content/css/usergrid-site.css           |  1553 +
 website/content/favicon.ico                     |   Bin 0 -> 3989 bytes
 website/content/font/FontAwesome.otf            |   Bin 0 -> 61896 bytes
 .../content/font/fontawesome-webfont-eot.eot    |   Bin 0 -> 37405 bytes
 .../content/font/fontawesome-webfont-svg.svg    |   399 +
 .../content/font/fontawesome-webfont-ttf.ttf    |   Bin 0 -> 79076 bytes
 .../content/font/fontawesome-webfont-woff.woff  |   Bin 0 -> 43572 bytes
 website/content/img/alberto.jpg                 |   Bin 0 -> 16137 bytes
 website/content/img/alex.png                    |   Bin 0 -> 40842 bytes
 website/content/img/apache_usergrid_favicon.png |   Bin 0 -> 10735 bytes
 .../content/img/apache_usergrid_logo_white.png  |   Bin 0 -> 26418 bytes
 .../img/apache_usergrid_logo_white_small.png    |   Bin 0 -> 11905 bytes
 website/content/img/check_flat/default.png      |   Bin 0 -> 25851 bytes
 website/content/img/dave.jpg                    |   Bin 0 -> 14005 bytes
 website/content/img/ed.jpg                      |   Bin 0 -> 20460 bytes
 website/content/img/egg-logo.png                |   Bin 0 -> 9938 bytes
 website/content/img/github.png                  |   Bin 0 -> 8936 bytes
 website/content/img/grey.png                    |   Bin 0 -> 37896 bytes
 website/content/img/intellij.png                |   Bin 0 -> 9199 bytes
 website/content/img/jeff.jpg                    |   Bin 0 -> 13857 bytes
 website/content/img/michael_r.jpg               |   Bin 0 -> 10244 bytes
 website/content/img/miked.jpg                   |   Bin 0 -> 36443 bytes
 website/content/img/nate.jpg                    |   Bin 0 -> 4291 bytes
 website/content/img/rod.jpg                     |   Bin 0 -> 40313 bytes
 website/content/img/scott.jpg                   |   Bin 0 -> 8555 bytes
 website/content/img/shawn.jpg                   |   Bin 0 -> 69304 bytes
 website/content/img/stliu.jpg                   |   Bin 0 -> 51303 bytes
 website/content/img/strong.jpg                  |   Bin 0 -> 7434 bytes
 website/content/img/structure101.png            |   Bin 0 -> 6475 bytes
 website/content/img/sungju.jpg                  |   Bin 0 -> 11440 bytes
 website/content/img/tim.jpg                     |   Bin 0 -> 7611 bytes
 website/content/img/todd.jpg                    |   Bin 0 -> 18142 bytes
 website/content/img/usergrid-logo.pdf           |   398 +
 website/content/img/usergrid.png                |   Bin 0 -> 21994 bytes
 website/content/img/usergrid_160.png            |   Bin 0 -> 2126 bytes
 website/content/img/usergrid_200.png            |   Bin 0 -> 6397 bytes
 website/content/img/usergrid_300.png            |   Bin 0 -> 16330 bytes
 .../content/img/usergrid_300_transparent.png    |   Bin 0 -> 16308 bytes
 website/content/img/usergrid_400.png            |   Bin 0 -> 8746 bytes
 website/content/img/usergrid_800.png            |   Bin 0 -> 14452 bytes
 website/content/img/usergrid_card.png           |   Bin 0 -> 23295 bytes
 website/content/img/usergrid_logo.png           |   Bin 0 -> 118086 bytes
 website/content/img/usergrid_logo_205_50.png    |   Bin 0 -> 7058 bytes
 website/content/img/usergrid_logo_260_50.png    |   Bin 0 -> 8682 bytes
 website/content/img/usergrid_logo_720.png       |   Bin 0 -> 27610 bytes
 website/content/img/usergrid_logo_720p.png      |   Bin 0 -> 27608 bytes
 website/content/img/usergrid_logo_900_200.png   |   Bin 0 -> 12273 bytes
 website/content/img/usergrid_logo_white.png     |   Bin 0 -> 16900 bytes
 website/content/img/usergrid_profile_128.png    |   Bin 0 -> 6689 bytes
 website/content/img/usergrid_profile_256.png    |   Bin 0 -> 10470 bytes
 .../content/img/usergrid_profile_256_white.png  |   Bin 0 -> 10724 bytes
 .../img/usergrid_profile_512_margins.png        |   Bin 0 -> 19112 bytes
 .../content/img/usergrid_profile_64_white.png   |   Bin 0 -> 4839 bytes
 .../content/img/usergrid_profile_background.png |   Bin 0 -> 6710 bytes
 website/content/img/usergrid_screencast_bg.png  |   Bin 0 -> 20478 bytes
 website/content/img/usergrid_small_100.png      |   Bin 0 -> 6681 bytes
 website/content/img/usergrid_wiki.png           |   Bin 0 -> 7135 bytes
 website/content/img/yourkit.jpeg                |   Bin 0 -> 7763 bytes
 website/content/js/bootstrap.min.js             |     8 +
 website/content/js/head.js                      |   708 +
 website/content/js/html5shiv.js                 |     8 +
 website/content/js/jquery-1.10.1.min.js         |     6 +
 website/content/js/jquery.icheck.js             |   397 +
 website/content/js/respond.min.js               |     6 +
 website/content/js/usergrid-site.js             |    50 +
 website/content/static/github-btn.html          |     2 +
 website/crash.log                               |   143 +
 website/layouts/community.html                  |     1 +
 website/layouts/docs.html                       |     1 +
 website/lib/default.rb                          |    43 +
 website/lib/helpers_.rb                         |     0
 website/lib/pandoc.template                     |     4 +
 website/nanoc.yaml                              |    77 +
 website/run.sh                                  |     1 +
 website/tmp/checksums                           |     2 -
 website/tmp/compiled_content                    | 91665 -----------------
 website/tmp/dependencies                        |   Bin 2372 -> 0 bytes
 website/utilities/map-markers.rb                |    62 +
 website/utilities/markers.txt                   |   440 +
 website/utilities/snapshot-apigee.rb            |    71 +
 website/utilities/usergrid.csv                  |   290 +
 117 files changed, 9512 insertions(+), 92137 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/data-queries/operators-and-types.md
----------------------------------------------------------------------
diff --git a/docs/data-queries/operators-and-types.md b/docs/data-queries/operators-and-types.md
index bb42107..8c0bb6a 100644
--- a/docs/data-queries/operators-and-types.md
+++ b/docs/data-queries/operators-and-types.md
@@ -41,6 +41,11 @@ The following operators and data types are supported by the SQL-like query langu
         <td>select * where quantity < '4000' and not quantity = '2000'</td>
     </tr>
     <tr>
+        <td>contains</td>
+        <td>Narrow by contained text</td>
+        <td>select * where title contains 'tale'</td>
+    </tr>
+    <tr>
         <td>and</td>
         <td>Union of results</td>
         <td>select * where quantity > '1000' and quantity < '4000'</td>
@@ -50,14 +55,24 @@ The following operators and data types are supported by the SQL-like query langu
         <td>Intersection of results</td>
         <td>select * where quantity = '1000' or quantity = '4000'</td>
     </tr>
-    <tr>
-        <td>contains</td>
-        <td>Narrow by contained text</td>
-        <td>select * where title contains 'tale'</td>
-    </tr>
 </table>
 
 
+### Precedence 
+
+The operators at the bottom of the above table are the ones with lower precedence. 
+When a query is evaluated the comparison operators (=, > , <, <= and >=) will be evaluated first.
+And next "not", "contains" and "or" will be evaluated and in that order.
+
+Though they are not shown above, parentheses are allowed and may be used to group query expressions.
+
+For example, given our rules of precedence, these two queries are equivalent:
+
+    select * where age > 6 or size = 'large' and color = 'tabby'
+    
+    select * where (age > 6 or size = 'large') and color = 'tabby'
+
+
 ## Data types
 
 As you develop queries, remember that entity properties each conform to a particular data type. For example, in the default entity User, the name property is stored as a string, the created date as a long, and metadata is stored as a JSON object. Your queries must be data type-aware to ensure that query results are as you expect them to be.

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/installation/ug2-deploy-to-tomcat.md
----------------------------------------------------------------------
diff --git a/docs/installation/ug2-deploy-to-tomcat.md b/docs/installation/ug2-deploy-to-tomcat.md
index a07f13a..752b4f3 100644
--- a/docs/installation/ug2-deploy-to-tomcat.md
+++ b/docs/installation/ug2-deploy-to-tomcat.md
@@ -2,6 +2,7 @@
 
 __NOTE__: Beware that Usergrid 2 is UNRELEASED SOFTWARE
 
+
 ## Requirements
 
 * [JDK 1.8](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
@@ -9,44 +10,56 @@ __NOTE__: Beware that Usergrid 2 is UNRELEASED SOFTWARE
 * [Tomcat 7+](https://tomcat.apache.org/download-70.cgi)
 * [Cassandra 1.2.1*](http://cassandra.apache.org/download/)
 * [ElasticSearch 1.4+](https://www.elastic.co/downloads/elasticsearch) 
-* [Usergrid 2.0](https://github.com/apache/usergrid/tree/two-dot-o)
-
-##Running
+* [Usergrid 2.1](https://github.com/apache/usergrid/tree/2.1-release)
 
+## Running
 
 1. Start up Cassandra [^1]
 	a. To do this you can navigate to the cassandra folder and run ```./bin/cassandra ```
 2. Start up Elasticsearch
 	a. To do this you can navigate to the folder where you extracted elasticsearch and run ```/bin/elasticsearch``` 	
 
-###Running Usergrid	
+### Running Usergrid	
 
-####Build The Java Sdk
+#### Build The Java SDK
 
 1. Navigate to where you cloned the usergrid repo
 2. Navigate to the ```sdks/java``` directory
 3. Run ```mvn clean install```
 
-####Build The Stack Itself
+#### Build The Stack Itself
 
 1. Navigate to the ```stack``` directory.
 2. Run ```mvn clean install -DskipTests```
 3. This will generate a war at ```rest/target/ROOT.war```
 
-####Deploying the Stack Locally
+#### Deploying the Stack Locally
+
 1. Take this war and deploy it on downloaded tomcat.
 1. In the lib directory of the tomcat you must also put usergrid-deployment.properties. ( An example file is provided below)
 1. Start up Tomcat
 	a. To do this you can navigate to folder where Tomcat is install and run ```./bin/catalina.sh start```
-1. Go to a web browser and input the following to initilizing the database ```localhost:8080/system/database/setup```. 
-	a. The credentials it asks for are the admin credentialls and password as defined in the usergrid-deployment.properties. 
-	b. You can also do a curl call with basic auth to automatically authenticate the call instead of using the web browser.
-1. Then using the same steps as before call ```localhost:8080/system/superuser/setup```
+	
+Next, you need to make some API calls to initialize Usergrid's storage and indexing systems. You can make these
+API calls using curl or your favorite HTTP client. These calls can only be done with the superuser credentials
+that appear in your __usergrid-deployment.properties__ file. Here's how to do the calls with curl (and assuming
+your superuser password is 'test'):
+
+    curl -X PUT http://localhost:8080/system/database/setup -u superuser:test
+    curl -X PUT http://localhost:8080/system/database/bootstrap -u superuser:test
+    curl -X GET http://localhost:8080/system/superuser/setup -u superuser:test
+
+Once those three calls execute without error, then you are done. If you do see errors the double-check that you
+have Cassandra and ElasticSearch running and that your properties files lists your Cassandra and ElasticSearch 
+hostnames correctly. Also check that ElasticSearch cluster name (in elasticsearch.yml) matches the one in the
+Usergrid properties file. If the problem persists come talk to us on the Usergrid mailing list, we might be able to help.
 
-The stack is now ready to be queried against, but to get the most out of it you'll need to initilize and use our portal!
+The stack is now ready to be queried against, but to get the most out of it you'll need to initialize and use our portal!
+
+#### Running The Portal Locally
+
+##### Requirments 
 
-####Running The Portal Locally
-#####Requirments 
 [nodejs 0.10+](https://nodejs.org/download/) 
 
 1. Make sure you've installed node.js above. Any version above .10 or .10 should work fine.
@@ -58,12 +71,13 @@ The stack is now ready to be queried against, but to get the most out of it you'
 Now usergrid is fully ready to use! Feel free to query against it or use it however you like!
 
 
-
 Example __usergrid-deployment.properties__ file
 ---
 ```
 # core persistence properties
 
+usergrid.cluster_name property=usergrid
+
 cassandra.embedded=false
 cassandra.version=1.2.18
 cassandra.timeout=2000

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/README.md
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/README.md b/docs/jersey2skeleton/README.md
new file mode 100644
index 0000000..f0115f1
--- /dev/null
+++ b/docs/jersey2skeleton/README.md
@@ -0,0 +1,9 @@
+# jersey2skeleton
+
+This is a minimal example project designed to mimic how Usergrid uses Jersey 2.
+
+Goal is to determine correct way to use Jersey and Swagger annotations to automatically
+generate Swagger from Usergrid's Java code.
+
+Current status: cannot determine correct combination of annotations to get the correct
+Swagger generated for the /management and /management/organizations end-points.

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/pom.xml
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/pom.xml b/docs/jersey2skeleton/pom.xml
new file mode 100644
index 0000000..dfeede5
--- /dev/null
+++ b/docs/jersey2skeleton/pom.xml
@@ -0,0 +1,387 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+
+    <!-- based on Usergrid's REST POM -->
+
+    <!-- Jersey 2 project with Spring wiring and Jackson for JSON processing -->
+
+    <groupId>org.apache.usergrid</groupId>
+    <artifactId>jersey2skeleton</artifactId>
+    <version>1.0-SNAPSHOT</version>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <build>
+        <finalName>ROOT</finalName>
+
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
+                <includes>
+                    <include>**/*.xml</include>
+                    <include>**/*.json</include>
+                </includes>
+            </resource>
+        </resources>
+
+        <testResources>
+            <testResource>
+                <directory>src/test/resources</directory>
+                <filtering>true</filtering>
+                <includes>
+                    <include>**/*</include>
+                </includes>
+            </testResource>
+        </testResources>
+
+        <plugins>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.3</version>
+                <configuration>
+                    <source>1.7</source>
+                    <target>1.7</target>
+                    <optimize>true</optimize>
+                    <showDeprecation>true</showDeprecation>
+                    <debug>true</debug>
+                    <encoding>UTF-8</encoding>
+                    <showWarnings>true</showWarnings>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.18.1</version>
+                <configuration>
+                    <systemPropertyVariables>
+                        <storage-config>${basedir}/src/test/conf</storage-config>
+                        <target.directory>${project.build.directory}</target.directory>
+                    </systemPropertyVariables>
+                    <parallel>methods</parallel>
+                    <forkCount>1</forkCount>
+                    <threadCount>1</threadCount>
+                    <useSystemClassLoader>false</useSystemClassLoader>
+                    <reuseForks>true</reuseForks>
+                    <argLine>-Dwebapp.directory=${basedir}/src/main/webapp
+                        -Djava.util.logging.config.file=${basedir}/src/test/resources/logging.properties
+                    </argLine>
+                    <includes>
+                        <include>**/*Test.java</include>
+                    </includes>
+                </configuration>
+
+                <dependencies>
+                    <dependency>
+                        <groupId>org.apache.maven.surefire</groupId>
+                        <artifactId>surefire-junit4</artifactId>
+                        <version>2.18.1</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>2.6</version>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>2.6</version>
+                <configuration>
+                    <finalName>${project.artifactId}-${project.version}</finalName>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>make-a-jar</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                        <configuration>
+                            <classifier>classes</classifier>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>jsp-jar-execution</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                        <configuration>
+                            <classifier>compiled-jsp</classifier>
+                            <classesDirectory>${project.build.directory}/jsp-source</classesDirectory>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <goals>
+                            <goal>test-jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>com.github.kongchen</groupId>
+                <artifactId>swagger-maven-plugin</artifactId>
+                <version>3.1.0</version>
+                <configuration>
+                    <apiSources>
+                        <apiSource>
+                            <springmvc>false</springmvc>
+                            <locations>org.apache.usergrid.testapp</locations>
+                            <info>
+                                <title>Test Docs</title>
+                                <version>v1</version>
+                                <description>Testing the Swagger Maven plugin</description>
+                                <license>
+                                    <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
+                                    <name>Apache 2.0</name>
+                                </license>
+                            </info>
+                            <templatePath>${basedir}/templates/strapdown.html.hbs</templatePath>
+                            <outputPath>${basedir}/target/swagger-docs/document.html</outputPath>
+                            <swaggerDirectory>${basedir}/target/swagger-docs</swaggerDirectory>
+                        </apiSource>
+                    </apiSources>
+                </configuration>
+                <executions>
+                    <execution>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            
+        </plugins>
+        
+    </build>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <scope>provided</scope>
+            <version>3.1.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>jstl</artifactId>
+            <version>1.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.glassfish.jersey.containers</groupId>
+            <artifactId>jersey-container-servlet</artifactId>
+            <version>2.21</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.glassfish.jersey.core</groupId>
+            <artifactId>jersey-client</artifactId>
+            <version>2.21</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.glassfish.jersey.connectors</groupId>
+            <artifactId>jersey-apache-connector</artifactId>
+            <version>2.21</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.glassfish.jersey.ext</groupId>
+            <artifactId>jersey-mvc-jsp</artifactId>
+            <version>2.21</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.glassfish.jersey.media</groupId>
+            <artifactId>jersey-media-multipart</artifactId>
+            <version>2.21</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.glassfish.jersey.media</groupId>
+            <artifactId>jersey-media-json-jackson</artifactId>
+            <version>2.21</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.glassfish.jersey.ext</groupId>
+            <artifactId>jersey-spring3</artifactId>
+            <version>2.21</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.fasterxml.jackson.jaxrs</groupId>
+            <artifactId>jackson-jaxrs-json-provider</artifactId>
+            <version>2.4.4</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-webmvc</artifactId>
+            <version>3.2.3.RELEASE</version>
+        </dependency>
+
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-jersey2-jaxrs</artifactId>
+            <version>1.5.0</version>
+        </dependency>
+
+        <!-- need Spring 4 to take full advantage of Java 8 features, but Jersey 2 doesn't support it? 
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-core</artifactId>
+            <version>4.2.0.RELEASE</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+            <version>4.2.0.RELEASE</version>
+        </dependency>
+        -->
+
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-core</artifactId>
+            <version>2.5.3</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+            <version>2.5.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+            <version>2.5.3</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>1.7.12</version>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <version>1.7.12</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>jul-to-slf4j</artifactId>
+            <version>1.7.12</version>
+        </dependency>
+        
+        
+        <!-- scope: test -->
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.11</version>
+            <scope>test</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.glassfish.jersey.test-framework</groupId>
+            <artifactId>jersey-test-framework-core</artifactId>
+            <version>2.21</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+            <artifactId>jersey-test-framework-provider-external</artifactId>
+            <version>2.21</version>
+            <scope>test</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>2.6</version>
+            <scope>test</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>17.0</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+            <scope>test</scope>
+            <version>7.0.64</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-logging-juli</artifactId>
+            <scope>test</scope>
+            <version>7.0.64</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-jasper</artifactId>
+            <scope>test</scope>
+            <version>7.0.64</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-jasper</artifactId>
+            <scope>test</scope>
+            <version>7.0.64</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-jasper-el</artifactId>
+            <scope>test</scope>
+            <version>7.0.64</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-servlet-api</artifactId>
+            <scope>test</scope>
+            <version>7.0.64</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-jsp-api</artifactId>
+            <scope>test</scope>
+            <version>7.0.64</version>
+        </dependency>
+
+    </dependencies>
+
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/AbstractResource.java
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/AbstractResource.java b/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/AbstractResource.java
new file mode 100644
index 0000000..cca3629
--- /dev/null
+++ b/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/AbstractResource.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.usergrid.testapp;
+
+import javax.ws.rs.container.ResourceContext;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.UriInfo;
+import javax.xml.ws.spi.http.HttpContext;
+
+
+public class AbstractResource {
+
+    @Context
+    protected UriInfo uriInfo;
+
+    @Context
+    protected HttpContext hc;
+
+    @Context
+    protected ResourceContext resourceContext;
+    
+    private AbstractResource parent;
+
+    public <T extends AbstractResource> T getSubResource(Class<T> t) {
+        T subResource = resourceContext.getResource(t);
+        subResource.setParent(this);
+        return subResource;
+    }
+
+    public void setParent(AbstractResource parent) {
+        this.parent = parent;
+    }
+
+    public AbstractResource getParent() {
+        return parent;
+    }
+}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/ApiResponse.java
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/ApiResponse.java b/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/ApiResponse.java
new file mode 100644
index 0000000..042bd53
--- /dev/null
+++ b/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/ApiResponse.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.usergrid.testapp;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.List;
+
+
+@XmlRootElement(name = "ApiResponse")
+public class ApiResponse {
+    private String content;
+    private List<Entity> entities;
+    
+    public ApiResponse() {
+    }
+
+    @XmlElement(name = "content")
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    @XmlElement(name = "entities")
+    @ApiModelProperty(value = "Entities contained in response.")
+    public List<Entity> getEntities() {
+        return entities;
+    }
+
+    public void setEntities(List<Entity> entities) {
+        this.entities = entities;
+    }
+}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/Entity.java
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/Entity.java b/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/Entity.java
new file mode 100644
index 0000000..f765320
--- /dev/null
+++ b/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/Entity.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.usergrid.testapp;
+
+import javax.xml.bind.annotation.XmlElement;
+import java.util.UUID;
+
+
+//@XmlRootElement(name="Entity")
+public class Entity {
+    private UUID id;
+    private String type;
+    private String name;
+
+    //@XmlElement(name="id")
+    public UUID getId() {
+        return id;
+    }
+
+    public void setId(UUID id) {
+        this.id = id;
+    }
+
+    //@XmlElement(name="type")
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    //@XmlElement(name="name")
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/ManagementResource.java
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/ManagementResource.java b/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/ManagementResource.java
new file mode 100644
index 0000000..b857d55
--- /dev/null
+++ b/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/ManagementResource.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.usergrid.testapp;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+
+@Api(value="/management", description = "Access to management information.")
+@Path("/management")
+@Component
+@Scope( "singleton" )
+@Produces({
+        MediaType.APPLICATION_JSON,
+        "application/javascript",
+        "application/x-javascript",
+        "text/ecmascript",
+        "application/ecmascript",
+        "text/jscript"
+})
+public class ManagementResource extends AbstractResource {
+
+    @GET
+    @Path("status")
+    @ApiOperation(value = "Status of management service")
+    public String getStatus() {
+        return "OK";     
+    }
+
+    @Path( "organizations" )
+    public OrganizationsResource getOrganizations() {
+        return getSubResource( OrganizationsResource.class );
+    }
+}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/OrganizationResource.java
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/OrganizationResource.java b/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/OrganizationResource.java
new file mode 100644
index 0000000..de58f2a
--- /dev/null
+++ b/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/OrganizationResource.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.usergrid.testapp;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import java.util.Collections;
+import java.util.UUID;
+
+
+@Component
+@Scope( "singleton" )
+@Produces({
+    MediaType.APPLICATION_JSON, 
+    "application/javascript", 
+    "application/x-javascript", 
+    "text/ecmascript", 
+    "application/ecmascript", 
+    "text/jscript"
+})
+public class OrganizationResource extends AbstractResource {
+    private String id;
+
+    public OrganizationResource() {
+    }
+    
+    public void init( String id ) {
+        this.id = id;
+    }
+
+    @GET
+    public ApiResponse getOrganization() {
+        Entity org = new Entity();
+        org.setName( "org:" + id );
+        org.setId( UUID.randomUUID() );
+        org.setType( "organization" );
+        ApiResponse response = new ApiResponse();
+        response.setContent( "organization:" + id );
+        response.setEntities( Collections.singletonList( org ));
+        return response;
+    }
+}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/OrganizationsResource.java
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/OrganizationsResource.java b/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/OrganizationsResource.java
new file mode 100644
index 0000000..9c2d5bd
--- /dev/null
+++ b/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/OrganizationsResource.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.usergrid.testapp;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import jersey.repackaged.com.google.common.collect.Lists;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import java.util.UUID;
+
+
+@Api(value="/management/organizations", description = "Access to organizations.", tags="management")
+@Path("/management/organizations")
+@Component
+@Scope("singleton")
+@Produces({
+        MediaType.APPLICATION_JSON,
+        "application/javascript",
+        "application/x-javascript",
+        "text/ecmascript",
+        "application/ecmascript",
+        "text/jscript"
+})
+public class OrganizationsResource extends AbstractResource {
+
+    @Path("/{id}")
+    @ApiOperation(value = "Get organization by id.", response=ApiResponse.class)
+    public OrganizationResource getOrganizationById(@PathParam("id") String id) {
+        OrganizationResource or = getSubResource( OrganizationResource.class );
+        or.init(id);
+        return or;
+    }
+
+    @GET
+    @ApiOperation(value = "Get organizations.", response=ApiResponse.class)
+    public ApiResponse getOrganizations() {
+        
+        Entity org1 = new Entity();
+        org1.setId( UUID.randomUUID() );
+        org1.setName( "org1" );
+        org1.setType( "organization" );
+        
+        Entity org2 = new Entity();
+        org2.setId( UUID.randomUUID() );
+        org2.setName( "org2" );
+        org2.setType( "organization" );
+
+        ApiResponse response = new ApiResponse();
+        response.setContent( "All Organizations" );
+        response.setEntities( Lists.newArrayList( org1, org2 ) );
+        
+        return response;
+    } 
+}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/StatusResource.java
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/StatusResource.java b/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/StatusResource.java
new file mode 100644
index 0000000..f537a01
--- /dev/null
+++ b/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/StatusResource.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.usergrid.testapp;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+
+@Api(value="/status", description = "Status end-point.")
+@Path("status")
+public class StatusResource {
+
+    @GET
+    @ApiOperation(value = "Status of webapp.")
+    public String getStatus() {
+        return "good";
+    }
+}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/User.java
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/User.java b/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/User.java
new file mode 100644
index 0000000..5e24f51
--- /dev/null
+++ b/docs/jersey2skeleton/src/main/java/org/apache/usergrid/testapp/User.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.usergrid.testapp;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+
+//@XmlRootElement(name="User")
+public class User extends Entity {
+    public User() {
+        super();
+        setType("user");
+    }
+}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/src/main/resources/applicationContext.xml
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/src/main/resources/applicationContext.xml b/docs/jersey2skeleton/src/main/resources/applicationContext.xml
new file mode 100644
index 0000000..2b877b1
--- /dev/null
+++ b/docs/jersey2skeleton/src/main/resources/applicationContext.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
+       xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p"
+       xsi:schemaLocation="
+	http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+	http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
+	http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
+
+    <context:component-scan base-package="org.apache.usergrid.testapp" />
+
+</beans>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/src/main/resources/jersey2skeleton-context.xml
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/src/main/resources/jersey2skeleton-context.xml b/docs/jersey2skeleton/src/main/resources/jersey2skeleton-context.xml
new file mode 100644
index 0000000..2b877b1
--- /dev/null
+++ b/docs/jersey2skeleton/src/main/resources/jersey2skeleton-context.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
+       xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p"
+       xsi:schemaLocation="
+	http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+	http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
+	http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
+
+    <context:component-scan base-package="org.apache.usergrid.testapp" />
+
+</beans>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/src/main/webapp/WEB-INF/web.xml b/docs/jersey2skeleton/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..d005b3a
--- /dev/null
+++ b/docs/jersey2skeleton/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" 
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+
+    <display-name>Jersey Skeleton app</display-name>
+
+    <context-param>
+        <param-name>contextConfigLocation</param-name>
+        <param-value>classpath:/jersey2skeleton-context.xml</param-value>
+    </context-param>
+
+    <listener>
+        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+    </listener>
+
+    <listener>
+        <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
+    </listener>
+
+    <filter>
+        <filter-name>jersey2skeleton</filter-name>
+        <filter-class>org.glassfish.jersey.servlet.ServletContainer</filter-class>
+
+        <init-param>
+            <param-name>jersey.config.servlet.filter.contextPath</param-name>
+            <param-value>/</param-value>
+        </init-param>
+
+        <init-param>
+            <param-name>jersey.config.server.provider.packages</param-name>
+            <param-value>org.apache.usergrid.testapp</param-value>
+        </init-param>
+
+        <init-param>
+            <param-name>jersey.config.server.provider.scanning.recursive</param-name>
+            <param-value>true</param-value>
+        </init-param>
+
+        <init-param>
+            <param-name>jersey.config.server.provider.classnames</param-name>
+            <param-value>
+                org.apache.usergrid.testapp.SecuredResourceFilterFactory,
+                org.glassfish.jersey.server.mvc.jsp.JspMvcFeature,
+                org.glassfish.jersey.media.multipart.MultiPartFeature
+
+                <!-- TODO: someday use @PermitAll, @DenyAll, @RolesAllowed -->
+                <!-- , org.glassfish.jersey.server.filter.RolesAllowedDynamicFeature -->
+            </param-value>
+        </init-param>
+
+        <init-param>
+            <param-name>jersey.config.server.mvc.templateBasePath.jsp</param-name>
+            <param-value>/WEB-INF/jsp</param-value>
+        </init-param>
+
+        <init-param>
+            <param-name>jersey.config.server.wadl.disableWadl</param-name>
+            <param-value>true</param-value>
+        </init-param>
+
+        <init-param>
+            <param-name>jersey.config.servlet.filter.staticContentRegex</param-name>
+            <param-value>/(((images|css|js|jsp|WEB-INF/jsp)/.*)|(favicon\.ico))</param-value>
+        </init-param>
+
+        <init-param>
+            <param-name>jersey.config.server.mediaTypeMappings</param-name>
+            <param-value>json:application/json,js:application/javascript</param-value>
+        </init-param>
+
+    </filter>
+
+    <filter-mapping>
+        <filter-name>jersey2skeleton</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
+
+</web-app>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/src/test/java/org/apache/usergrid/testapp/AvailablePortFinder.java
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/src/test/java/org/apache/usergrid/testapp/AvailablePortFinder.java b/docs/jersey2skeleton/src/test/java/org/apache/usergrid/testapp/AvailablePortFinder.java
new file mode 100644
index 0000000..0a33688
--- /dev/null
+++ b/docs/jersey2skeleton/src/test/java/org/apache/usergrid/testapp/AvailablePortFinder.java
@@ -0,0 +1,208 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.usergrid.testapp;
+
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.DatagramSocket;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.ServerSocket;
+import java.util.NoSuchElementException;
+import java.util.Set;
+import java.util.TreeSet;
+
+
+/**
+ * Finds currently available server ports.
+ *
+ * @author <a href="http://mina.apache.org">Apache MINA Project</a>
+ * @see <a href="http://www.iana.org/assignments/port-numbers">IANA.org</a>
+ */
+public class AvailablePortFinder {
+	
+	private static final Logger LOG = LoggerFactory.getLogger( AvailablePortFinder.class );
+    /** The minimum number of server port number. */
+    public static final int MIN_PORT_NUMBER = 1;
+
+    /** The maximum number of server port number. */
+    public static final int MAX_PORT_NUMBER = 49151;
+
+
+    /** Creates a new instance. */
+    private AvailablePortFinder() {
+        // Do nothing
+    }
+
+
+    /**
+     * Returns the {@link Set} of currently available port numbers ({@link Integer}).  This method is identical to
+     * <code>getAvailablePorts(MIN_PORT_NUMBER, MAX_PORT_NUMBER)</code>.
+     * <p/>
+     * WARNING: this can take a very long time.
+     */
+    public static Set<Integer> getAvailablePorts() {
+        return getAvailablePorts( MIN_PORT_NUMBER, MAX_PORT_NUMBER );
+    }
+
+
+    /**
+     * Gets an available port, selected by the system.
+     *
+     * @throws NoSuchElementException if there are no ports available
+     */
+    public static int getNextAvailable() {
+        ServerSocket serverSocket = null;
+
+        try {
+            // Here, we simply return an available port found by the system
+            serverSocket = new ServerSocket( 0 );
+            int port = serverSocket.getLocalPort();
+
+            // Don't forget to close the socket...
+            serverSocket.close();
+
+            return port;
+        }
+        catch ( IOException ioe ) {
+            throw new NoSuchElementException( ioe.getMessage() );
+        }
+    }
+
+
+    /**
+     * Gets the next available port starting at a port.
+     *
+     * @param fromPort the port to scan for availability
+     *
+     * @throws NoSuchElementException if there are no ports available
+     */
+    public static int getNextAvailable( int fromPort ) {
+        if ( fromPort < MIN_PORT_NUMBER || fromPort > MAX_PORT_NUMBER ) {
+            throw new IllegalArgumentException( "Invalid start port: " + fromPort );
+        }
+
+        for ( int i = fromPort; i <= MAX_PORT_NUMBER; i++ ) {
+            if ( available( i ) ) {
+                return i;
+            }
+        }
+
+        throw new NoSuchElementException( "Could not find an available port " + "above " + fromPort );
+    }
+
+
+    /**
+     * Checks to see if a specific port is available.
+     *
+     * @param port the port to check for availability
+     */
+    public static boolean available( int port ) {
+        if ( port < MIN_PORT_NUMBER || port > MAX_PORT_NUMBER ) {
+            throw new IllegalArgumentException( "Invalid start port: " + port );
+        }
+
+        ServerSocket ss = null;
+        DatagramSocket ds = null;
+
+        try {
+			// Jackson: It seems like the code below intends to
+			// setReuseAddress(true), but that needs to be set before the bind.
+			// The constructor for the ServerSocket(int) will bind, so not sure
+			// how it would have been working as intended previously. 
+        	
+			// Changing ServerSocket constructor to use default constructor,
+			// this would be unbound, then set the socket reuse, and
+			// call the bind separately
+        	
+            //ss = new ServerSocket( port );
+        	ss = new ServerSocket();
+            ss.setReuseAddress( true );
+            ss.bind(new InetSocketAddress((InetAddress) null, port), 0);
+            
+			// Unlike ServerSocket, the default constructor of DatagramSocket
+			// will bound. To create an unbound DatagramSocket, use null address 
+            //ds = new DatagramSocket( port );
+            ds = new DatagramSocket(null);
+            ds.setReuseAddress( true );
+            ds.bind(new InetSocketAddress((InetAddress) null, port));
+            LOG.info("port {} available", port);
+            return true;
+        }
+        catch ( IOException e ) {
+            // Do nothing
+        }
+        finally {
+            if ( ds != null ) {
+                ds.close();
+            }
+
+            if ( ss != null ) {
+                try {
+                    ss.close();
+                }
+                catch ( IOException e ) {
+                    /* should not be thrown */
+                }
+            }
+        }
+        LOG.info("port {} unavailable", port);
+        return false;
+    }
+
+
+    /**
+     * Returns the {@link Set} of currently avaliable port numbers ({@link Integer}) between the specified port range.
+     *
+     * @throws IllegalArgumentException if port range is not between {@link #MIN_PORT_NUMBER} and {@link
+     * #MAX_PORT_NUMBER} or <code>fromPort</code> if greater than <code>toPort</code>.
+     */
+    public static Set<Integer> getAvailablePorts( int fromPort, int toPort ) {
+        if ( fromPort < MIN_PORT_NUMBER || toPort > MAX_PORT_NUMBER || fromPort > toPort ) {
+            throw new IllegalArgumentException( "Invalid port range: " + fromPort + " ~ " + toPort );
+        }
+
+        Set<Integer> result = new TreeSet<Integer>();
+
+        for ( int i = fromPort; i <= toPort; i++ ) {
+            ServerSocket s = null;
+
+            try {
+                s = new ServerSocket( i );
+                result.add(i);
+            }
+            catch ( IOException e ) {
+                // Do nothing
+            }
+            finally {
+                if ( s != null ) {
+                    try {
+                        s.close();
+                    }
+                    catch ( IOException e ) {
+                        /* should not be thrown */
+                    }
+                }
+            }
+        }
+
+        return result;
+    }
+}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/src/test/java/org/apache/usergrid/testapp/OrganizationTest.java
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/src/test/java/org/apache/usergrid/testapp/OrganizationTest.java b/docs/jersey2skeleton/src/test/java/org/apache/usergrid/testapp/OrganizationTest.java
new file mode 100644
index 0000000..faaaf95
--- /dev/null
+++ b/docs/jersey2skeleton/src/test/java/org/apache/usergrid/testapp/OrganizationTest.java
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.usergrid.testapp;
+
+import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.jackson.JacksonFeature;
+import org.glassfish.jersey.test.DeploymentContext;
+import org.glassfish.jersey.test.JerseyTest;
+import org.glassfish.jersey.test.spi.TestContainer;
+import org.glassfish.jersey.test.spi.TestContainerFactory;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.ws.rs.core.Application;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import static junit.framework.Assert.assertEquals;
+
+
+public class OrganizationTest extends JerseyTest {
+    private static final Logger logger = LoggerFactory.getLogger( TomcatMain.class );
+    
+    // TomcatRuntime is copied from Usergrid
+    public static TomcatRuntime tomcatRuntime = TomcatRuntime.getInstance();
+
+    private static ClientConfig clientConfig = new ClientConfig();
+    static {
+        clientConfig.register( new JacksonFeature() );
+    }
+
+    @Override
+    protected Application configure() {
+        return new Application();
+    }
+
+    @Test
+    public void testGetManagementStatus() {
+        
+        String path = "/management/status";
+        logger.info( "***** Testing against URI: {}{}", getBaseUri(), path );
+        String responseString = getClient().target( getBaseUri() + path ).request().get( String.class );
+        
+        assertEquals( "OK", responseString );
+    }
+
+    @Test
+    public void testGetOrganizations() {
+        
+        String path = "/management/organizations";
+        logger.info( "***** Testing against URI: {}{}", getBaseUri(), path );
+        ApiResponse response = getClient().target( getBaseUri() + path ).request().get( ApiResponse.class );
+        
+        assertEquals( "All Organizations", response.getContent() );
+        assertEquals( 2, response.getEntities().size() );
+    }
+    
+    @Test
+    public void testGetOrganization() {
+        
+        String path = "/management/organizations/1";
+        logger.info( "***** Testing against URI: {}{}", getBaseUri(), path );
+        ApiResponse response = getClient().target( getBaseUri() + path ).request().get( ApiResponse.class );
+        
+        assertEquals( "organization:1", response.getContent() );
+        assertEquals( 1, response.getEntities().size() );
+    }
+    
+    // Returns a do-nothing test container, we're using TomcatRuntime instead.
+    @Override
+    protected TestContainerFactory getTestContainerFactory() {
+        final URI baseURI = getBaseUri();
+        
+        return new TestContainerFactory() {
+            @Override
+            public TestContainer create(URI uri, DeploymentContext deploymentContext) {
+                return new TestContainer() {
+
+                    @Override
+                    public ClientConfig getClientConfig() {
+                        return clientConfig;
+                    }
+
+                    @Override
+                    public URI getBaseUri() {
+                        return baseURI;
+                    }
+
+                    @Override
+                    public void start() {
+                        // noop
+                    }
+
+                    @Override
+                    public void stop() {
+                        // noop
+                    }
+                };
+            }
+        };
+
+    }
+
+    protected URI getBaseUri() {
+        try {
+            return new URI("http://localhost:" + tomcatRuntime.getPort());
+        } catch (URISyntaxException e) {
+            throw new RuntimeException("Error determining baseURI", e);
+        }
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/src/test/java/org/apache/usergrid/testapp/TomcatMain.java
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/src/test/java/org/apache/usergrid/testapp/TomcatMain.java b/docs/jersey2skeleton/src/test/java/org/apache/usergrid/testapp/TomcatMain.java
new file mode 100644
index 0000000..c0e41ba
--- /dev/null
+++ b/docs/jersey2skeleton/src/test/java/org/apache/usergrid/testapp/TomcatMain.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2014 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.usergrid.testapp;
+
+import com.google.common.io.Files;
+import org.apache.catalina.startup.Tomcat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+
+
+/**
+ * Simple wrapper for starting "embedded" Tomcat as it's own process, for testing.
+ */
+public class TomcatMain {
+    
+    private static final Logger log = LoggerFactory.getLogger( TomcatMain.class );
+
+    public static void main(String[] args) throws Exception {
+
+        String webappsPath = args[0];
+        int port = Integer.parseInt( args[1] );
+
+        File dataDir = Files.createTempDir();
+        dataDir.deleteOnExit();
+
+        Tomcat tomcat = new Tomcat();
+        tomcat.setBaseDir(dataDir.getAbsolutePath());
+        tomcat.setPort(port);
+        tomcat.getConnector().setAttribute("maxThreads", "1000");
+        tomcat.addWebapp("/", new File(webappsPath).getAbsolutePath());
+
+        log.info("-----------------------------------------------------------------");
+        log.info("Starting Tomcat port {} dir {}", port, webappsPath);
+        log.info("-----------------------------------------------------------------");
+        tomcat.start();
+
+        while ( true ) {
+            Thread.sleep(1000);
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/src/test/java/org/apache/usergrid/testapp/TomcatRuntime.java
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/src/test/java/org/apache/usergrid/testapp/TomcatRuntime.java b/docs/jersey2skeleton/src/test/java/org/apache/usergrid/testapp/TomcatRuntime.java
new file mode 100644
index 0000000..16bd77f
--- /dev/null
+++ b/docs/jersey2skeleton/src/test/java/org/apache/usergrid/testapp/TomcatRuntime.java
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.usergrid.testapp;
+
+
+import com.google.common.io.Files;
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.startup.Tomcat;
+import org.apache.commons.lang.math.RandomUtils;
+import org.junit.rules.ExternalResource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
+import javax.ws.rs.client.WebTarget;
+import java.io.File;
+
+
+/**
+ * Start and stop embedded Tomcat.
+ */
+public class TomcatRuntime extends ExternalResource {
+    private static final Logger log = LoggerFactory.getLogger( TomcatRuntime.class );
+
+
+    private static final String WEBAPP_PATH = System.getProperty("webapp.directory");
+
+    private static TomcatRuntime instance;
+
+    public final TomcatInstance tomcat;
+
+
+    private TomcatRuntime() {
+
+        tomcat = new TomcatInstance( WEBAPP_PATH );
+        tomcat.startTomcat();
+
+        //stop on JVM shutdown
+        Runtime.getRuntime().addShutdownHook( new Thread() {
+            @Override
+            public void run() {
+                tomcat.stopTomcat();
+            }
+        } );
+    }
+
+
+    /**
+     * Get the instance of the tomcat runtime and starts the tomcat singleton.  Starts tomcat once per JVM
+     * @return
+     */
+    public static synchronized TomcatRuntime getInstance() {
+        if ( instance == null ) {
+
+
+            instance = new TomcatRuntime();
+        }
+
+        return instance;
+    }
+
+
+    /**
+     * Get the port tomcat is running on
+     */
+    public int getPort() {
+        return tomcat.getPort();
+    }
+
+
+    /**
+     * Inner class of tomcat runtime
+     */
+    private static class TomcatInstance {
+
+        public static final int THREADS_PERPROC = 25;
+
+        private final String webAppsPath;
+
+        private Tomcat tomcat = null;
+        private int port;
+
+        private boolean started = false;
+
+
+        private TomcatInstance( final String webAppsPath ) {this.webAppsPath = webAppsPath;}
+
+
+        /**
+         * Start the tomcat instance
+         */
+        public void startTomcat() {
+            try {
+
+                //we don't want to use all our threads, we'll kill the box
+                final int availableProcessors = Runtime.getRuntime().availableProcessors();
+                final int usedProcs = Math.min( 2, availableProcessors );
+                final int threads = usedProcs * THREADS_PERPROC;
+
+
+                File dataDir = Files.createTempDir();
+                dataDir.deleteOnExit();
+
+                port = AvailablePortFinder.getNextAvailable( 9998 + RandomUtils.nextInt( 10 ) );
+
+                tomcat = new Tomcat();
+                tomcat.setBaseDir( dataDir.getAbsolutePath() );
+                tomcat.setPort( port );
+
+
+                tomcat.getConnector().setAttribute( "maxThreads", "" + threads );
+
+                tomcat.addWebapp( "/", new File( webAppsPath ).getAbsolutePath() );
+
+
+                log.info( "-----------------------------------------------------------------" );
+                log.info( "Starting Tomcat embedded port {} dir {}", port, dataDir.getAbsolutePath() );
+                log.info( "-----------------------------------------------------------------" );
+                tomcat.start();
+
+                waitForTomcat();
+
+            }
+            catch ( Exception e ) {
+                throw new RuntimeException( "Couldn't start tomcat", e );
+            }
+        }
+
+
+        /**
+         * Stop the embedded tomcat process
+         */
+        public void stopTomcat() {
+            try {
+                tomcat.stop();
+            }
+            catch ( LifecycleException e ) {
+                throw new RuntimeException( "Unable to stop tomcat", e );
+            }
+        }
+
+
+        public int getPort() {
+            return port;
+        }
+
+
+        private void waitForTomcat() throws RuntimeException {
+            String url = "http://localhost:" + port + "/status";
+            int count = 0;
+            while ( count++ < 30 ) {
+                try {
+                    Thread.sleep( 1000 );
+                    Client c = ClientBuilder.newClient();
+                    WebTarget wr = c.target( url );
+                    wr.request().get( String.class );
+                    log.info( "Tomcat is started." );
+                    started = true;
+                    break;
+                }
+                catch ( Exception e ) {
+                    log.info( "Waiting for Tomcat on url {}", url );
+                }
+            }
+            if ( !started ) {
+                throw new RuntimeException( "Tomcat process never started." );
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/src/test/resources/log4j.properties b/docs/jersey2skeleton/src/test/resources/log4j.properties
new file mode 100644
index 0000000..8241c0a
--- /dev/null
+++ b/docs/jersey2skeleton/src/test/resources/log4j.properties
@@ -0,0 +1,31 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# for production, you should probably set the root to INFO
+# and the pattern to %c instead of %l.  (%l is slower.)
+
+# output messages into a rolling log file as well as stdout
+log4j.rootLogger=ERROR,stdout
+
+# stdout
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+#log4j.appender.stdout.layout=org.apache.log4j.SimpleLayout
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d %p (%t) %c{1} - %m%n
+
+log4j.logger.org.glassfish=DEBUG
+
+log4j.logger.org.apache.usergrid.testapp=DEBUG

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/src/test/resources/logging.properties
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/src/test/resources/logging.properties b/docs/jersey2skeleton/src/test/resources/logging.properties
new file mode 100644
index 0000000..f0dcc65
--- /dev/null
+++ b/docs/jersey2skeleton/src/test/resources/logging.properties
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Tweak this file to get more logging out Jersey and other depedencies that use
+# Java Logging instead of our preferred SLF4J via Log4j setup.
+
+handlers = org.slf4j.bridge.SLF4JBridgeHandler
+
+#All log level details
+.level=INFO
+org.glassfish.jersey.level=FINE
+org.glassfish.jersey.tracing.level=FINE
+

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/templates/markdown.hbs
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/templates/markdown.hbs b/docs/jersey2skeleton/templates/markdown.hbs
new file mode 100644
index 0000000..546f673
--- /dev/null
+++ b/docs/jersey2skeleton/templates/markdown.hbs
@@ -0,0 +1,108 @@
+#{{#info}}{{title}}
+
+
+## {{join schemes " | "}}://{{host}}{{basePath}}
+
+
+{{description}}
+
+{{#contact}}
+[**Contact the developer**](mailto:{{email}})
+{{/contact}}
+
+**Version** {{version}}
+
+[**Terms of Service**]({{termsOfService}})
+
+{{#license}}[**{{name}}**]({{url}}){{/license}}
+
+{{/info}}
+
+{{#if consumes}}**Consumes:** {{join consumes ", "}}{{/if}}
+
+{{#if produces}}**Produces:** {{join produces ", "}}{{/if}}
+
+{{#if securityDefinitions}}
+# Security Definitions
+{{/if}}
+{{> security}}
+
+# APIs
+
+{{#each paths}}
+## {{@key}}
+{{#this}}
+{{#get}}
+### GET
+{{> operation}}
+{{/get}}
+
+{{#put}}
+### PUT
+{{> operation}}
+{{/put}}
+
+{{#post}}
+### POST
+
+{{> operation}}
+
+{{/post}}
+
+{{#delete}}
+### DELETE
+{{> operation}}
+{{/delete}}
+
+{{#option}}
+### OPTION
+{{> operation}}
+{{/option}}
+
+{{#patch}}
+### PATCH
+{{> operation}}
+{{/patch}}
+
+{{#head}}
+### HEAD
+{{> operation}}
+{{/head}}
+
+{{/this}}
+{{/each}}
+
+# Definitions
+{{#each definitions}}
+## <a name="/definitions/{{key}}">{{@key}}</a>
+
+<table border="1">
+    <tr>
+        <th>name</th>
+        <th>type</th>
+        <th>required</th>
+        <th>description</th>
+        <th>example</th>
+    </tr>
+    {{#each this.properties}}
+        <tr>
+            <td>{{@key}}</td>
+            <td>
+                {{#ifeq type "array"}}
+                {{#items.$ref}}
+                    {{type}}[<a href="{{items.$ref}}">{{basename items.$ref}}</a>]
+                {{/items.$ref}}
+                {{^items.$ref}}{{type}}[{{items.type}}]{{/items.$ref}}
+                {{else}}
+                    {{#$ref}}<a href="{{$ref}}">{{basename $ref}}</a>{{/$ref}}
+                    {{^$ref}}{{type}}{{#format}} ({{format}}){{/format}}{{/$ref}}
+                {{/ifeq}}
+            </td>
+            <td>{{#required}}required{{/required}}{{^required}}optional{{/required}}</td>
+            <td>{{#description}}{{{description}}}{{/description}}{{^description}}-{{/description}}</td>
+            <td>{{example}}</td>
+        </tr>
+    {{/each}}
+</table>
+{{/each}}
+

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/templates/operation.hbs
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/templates/operation.hbs b/docs/jersey2skeleton/templates/operation.hbs
new file mode 100644
index 0000000..a581961
--- /dev/null
+++ b/docs/jersey2skeleton/templates/operation.hbs
@@ -0,0 +1,73 @@
+{{#deprecated}}-deprecated-{{/deprecated}}
+<a id="{{operationId}}">{{summary}}</a>
+
+{{description}}
+
+{{#if externalDocs.url}}{{externalDocs.description}}. [See external documents for more details]({{externalDocs.url}})
+{{/if}}
+
+{{#if security}}
+#### Security
+{{/if}}
+
+{{#security}}
+{{#each this}}
+* {{@key}}
+{{#this}}   * {{this}}
+{{/this}}
+{{/each}}
+{{/security}}
+
+#### Request
+
+{{#if consumes}}
+**Content-Type: ** {{join consumes ", "}}{{/if}}
+
+##### Parameters
+{{#if parameters}}
+<table border="1">
+    <tr>
+        <th>Name</th>
+        <th>Located in</th>
+        <th>Required</th>
+        <th>Description</th>
+        <th>Default</th>
+        <th>Schema</th>
+    </tr>
+{{/if}}
+
+{{#parameters}}
+<tr>
+    <th>{{name}}</th>
+    <td>{{in}}</td>
+    <td>{{#if required}}yes{{else}}no{{/if}}</td>
+    <td>{{description}}{{#if pattern}} (**Pattern**: `{{pattern}}`){{/if}}</td>
+    <td> - </td>
+{{#ifeq in "body"}}
+    <td>
+    {{#ifeq schema.type "array"}}Array[<a href="{{schema.items.$ref}}">{{basename schema.items.$ref}}</a>]{{/ifeq}}
+    {{#schema.$ref}}<a href="{{schema.$ref}}">{{basename schema.$ref}}</a> {{/schema.$ref}}
+    </td>
+{{else}}
+    {{#ifeq type "array"}}
+            <td>Array[{{items.type}}] ({{collectionFormat}})</td>
+    {{else}}
+            <td>{{type}} {{#format}}({{format}}){{/format}}</td>
+    {{/ifeq}}
+{{/ifeq}}
+</tr>
+{{/parameters}}
+{{#if parameters}}
+</table>
+{{/if}}
+
+
+#### Response
+
+{{#if produces}}**Content-Type: ** {{join produces ", "}}{{/if}}
+
+
+| Status Code | Reason      | Response Model |
+|-------------|-------------|----------------|
+{{#each responses}}| {{@key}}    | {{description}} | {{#schema.$ref}}<a href="{{schema.$ref}}">{{basename schema.$ref}}</a>{{/schema.$ref}}{{#ifeq schema.type "array"}}Array[<a href="{{schema.items.$ref}}">{{basename schema.items.$ref}}</a>]{{/ifeq}}{{^schema}} - {{/schema}}|
+{{/each}}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/templates/security.hbs
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/templates/security.hbs b/docs/jersey2skeleton/templates/security.hbs
new file mode 100644
index 0000000..04f86e8
--- /dev/null
+++ b/docs/jersey2skeleton/templates/security.hbs
@@ -0,0 +1,88 @@
+{{#each securityDefinitions}}
+### {{@key}}
+{{#this}}
+{{#ifeq type "oauth2"}}
+<table>
+    <tr>
+        <th>type</th>
+        <th colspan="2">{{type}}</th>
+    </tr>
+{{#if description}}
+        <tr>
+            <th>description</th>
+            <th colspan="2">{{description}}</th>
+        </tr>
+{{/if}}
+{{#if authorizationUrl}}
+        <tr>
+            <th>authorizationUrl</th>
+            <th colspan="2">{{authorizationUrl}}</th>
+        </tr>
+{{/if}}
+{{#if flow}}
+        <tr>
+            <th>flow</th>
+            <th colspan="2">{{flow}}</th>
+        </tr>
+{{/if}}
+{{#if tokenUrl}}
+        <tr>
+            <th>tokenUrl</th>
+            <th colspan="2">{{tokenUrl}}</th>
+        </tr>
+{{/if}}
+{{#if scopes}}
+    <tr>
+        <td rowspan="3">scopes</td>
+{{#each scopes}}
+            <td>{{@key}}</td>
+            <td>{{this}}</td>
+        </tr>
+        <tr>
+{{/each}}
+    </tr>
+{{/if}}
+</table>
+{{/ifeq}}
+{{#ifeq type "apiKey"}}
+<table>
+    <tr>
+        <th>type</th>
+        <th colspan="2">{{type}}</th>
+    </tr>
+{{#if description}}
+        <tr>
+            <th>description</th>
+            <th colspan="2">{{description}}</th>
+        </tr>
+{{/if}}
+{{#if name}}
+        <tr>
+            <th>name</th>
+            <th colspan="2">{{name}}</th>
+        </tr>
+{{/if}}
+{{#if in}}
+        <tr>
+            <th>in</th>
+            <th colspan="2">{{in}}</th>
+        </tr>
+{{/if}}
+</table>
+{{/ifeq}}
+{{#ifeq type "basic"}}
+<table>
+    <tr>
+        <th>type</th>
+        <th colspan="2">{{type}}</th>
+    </tr>
+{{#if description}}
+        <tr>
+            <th>description</th>
+            <th colspan="2">{{description}}</th>
+        </tr>
+{{/if}}
+</table>
+{{/ifeq}}
+{{/this}}
+{{/each}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/usergrid/blob/5ed3d753/docs/jersey2skeleton/templates/strapdown.html.hbs
----------------------------------------------------------------------
diff --git a/docs/jersey2skeleton/templates/strapdown.html.hbs b/docs/jersey2skeleton/templates/strapdown.html.hbs
new file mode 100644
index 0000000..ec02669
--- /dev/null
+++ b/docs/jersey2skeleton/templates/strapdown.html.hbs
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<title>API Document</title>
+
+<xmp theme="united" style="display:none;">
+{{>markdown}}
+</xmp>
+
+<script src="http://strapdownjs.com/v/0.2/strapdown.js"></script>
+</html>
\ No newline at end of file