refactoring, testing, documentation, CLI modes

break up streams-schemas into streams-util and streams-schema-activitystreams
add index.md to each plugin
specify basepath of jsonschema project-wide
harmonize plugin behavior, code style, docs
ensure all tests pass
add CLI modes


Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/d9674f7c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/d9674f7c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/d9674f7c

Branch: refs/heads/master
Commit: d9674f7c0706d0e170f123c461d22e56e8f73807
Parents: 61f2736
Author: Steve Blackmon @steveblackmon <sblack...@apache.org>
Authored: Wed Jun 1 12:32:14 2016 -0500
Committer: Steve Blackmon @steveblackmon <sblack...@apache.org>
Committed: Wed Jun 1 12:52:22 2016 -0500

----------------------------------------------------------------------
 .../spring/streams-cassandra-context.xml        |  25 --
 .../streams-plugin-cassandra/pom.xml            |  13 +-
 .../StreamsCassandraGenerationConfig.java       |   2 +-
 .../StreamsCassandraResourceGenerator.java      |  42 +--
 .../StreamsCassandraResourceGeneratorMojo.java  |  37 +-
 .../src/site/markdown/index.md                  |  22 +-
 ...treamsCassandraResourceGeneratorCLITest.java |  10 +-
 ...reamsCassandraResourceGeneratorMojoTest.java |   9 +-
 .../StreamsCassandraResourceGeneratorTest.java  |  58 +--
 .../resources/streams-plugin-cassandra/pom.xml  |  21 +-
 .../streams-plugin-elasticsearch/pom.xml        |  13 +-
 .../StreamsElasticsearchGenerationConfig.java   |   2 +-
 .../StreamsElasticsearchResourceGenerator.java  |  75 ++--
 ...reamsElasticsearchResourceGeneratorMojo.java |  29 +-
 .../src/site/markdown/index.md                  |  24 +-
 ...msElasticsearchResourceGeneratorCLITest.java |  39 ++
 ...reamsElasticsearchResourceGeneratorTest.java |  59 +--
 .../streams-plugin-elasticsearch/pom.xml        |  23 +-
 streams-plugins/streams-plugin-hbase/pom.xml    |  13 +-
 .../hbase/StreamsHbaseGenerationConfig.java     |   2 +-
 .../hbase/StreamsHbaseResourceGenerator.java    |  41 +-
 .../StreamsHbaseResourceGeneratorMojo.java      |  28 +-
 .../src/site/markdown/index.md                  |  26 +-
 .../StreamsHbaseResourceGeneratorCLITest.java   |   2 +-
 .../StreamsHbaseResourceGeneratorMojoTest.java  |   2 +-
 .../test/StreamsHbaseResourceGeneratorTest.java |  31 +-
 .../test/resources/streams-plugin-hbase/pom.xml |  23 +-
 streams-plugins/streams-plugin-hive/pom.xml     |  13 +-
 .../hive/StreamsHiveGenerationConfig.java       |   3 +-
 .../hive/StreamsHiveResourceGenerator.java      |  35 +-
 .../hive/StreamsHiveResourceGeneratorMojo.java  |  38 +-
 .../src/site/markdown/index.md                  |  28 +-
 .../StreamsHiveResourceGeneratorCLITest.java    |   2 +-
 .../StreamsHiveResourceGeneratorMojoTest.java   |   2 +-
 .../test/StreamsHiveResourceGeneratorTest.java  |  32 +-
 .../test/resources/streams-plugin-hive/pom.xml  |  23 +-
 streams-plugins/streams-plugin-pig/pom.xml      |  13 +-
 .../plugins/pig/StreamsPigGenerationConfig.java |   3 +-
 .../pig/StreamsPigResourceGenerator.java        |  46 +--
 .../pig/StreamsPigResourceGeneratorMojo.java    |  38 +-
 .../src/site/markdown/index.md                  |  24 +-
 .../StreamsPigResourceGeneratorCLITest.java     |   4 +-
 .../StreamsPigResourceGeneratorMojoTest.java    |   4 +-
 .../test/StreamsPigResourceGeneratorTest.java   |  32 +-
 .../test/resources/streams-plugin-pig/pom.xml   |  23 +-
 streams-plugins/streams-plugin-pojo/pom.xml     |  13 +-
 .../plugins/StreamsPojoSourceGenerator.java     |  15 +-
 .../plugins/StreamsPojoSourceGeneratorMojo.java | 154 +-------
 .../src/site/markdown/index.md                  |  24 +-
 .../test/StreamsPojoSourceGeneratorCLITest.java |   2 +-
 .../StreamsPojoSourceGeneratorMojoTest.java     |   2 +-
 .../test/StreamsPojoSourceGeneratorTest.java    |  51 +--
 .../test/resources/streams-plugin-pojo/pom.xml  |  30 +-
 streams-plugins/streams-plugin-scala/pom.xml    |  12 +
 .../streams/plugins/StreamsPojoScala.java       | 371 -------------------
 .../streams/plugins/StreamsPojoScalaMojo.java   |  71 ----
 .../plugins/StreamsScalaSourceGenerator.java    | 351 ++++++++++++++++++
 .../StreamsScalaSourceGeneratorMojo.java        |  59 +++
 .../src/site/markdown/index.md                  |  36 ++
 .../plugins/test/StreamsPojoScalaTest.java      |  55 ---
 .../test/StreamsScalaSourceGeneratorTest.java   |  55 +++
 streams-runtimes/streams-runtime-local/pom.xml  |   2 +-
 streams-schemas/pom.xml                         |  77 +---
 .../org/apache/streams/schema/FieldType.java    |  13 -
 .../org/apache/streams/schema/FieldUtil.java    |  59 ---
 .../org/apache/streams/schema/FileUtil.java     |  76 ----
 .../apache/streams/schema/GenerationConfig.java | 115 ------
 .../java/org/apache/streams/schema/Schema.java  |  57 ---
 .../org/apache/streams/schema/SchemaStore.java  | 283 --------------
 .../org/apache/streams/schema/SchemaUtil.java   |  50 ---
 .../java/org/apache/streams/schema/URIUtil.java |  31 --
 .../src/main/jsonschema/activity.json           | 108 ------
 .../src/main/jsonschema/collection.json         |  47 ---
 .../src/main/jsonschema/media_link.json         |  34 --
 streams-schemas/src/main/jsonschema/object.json |  98 -----
 .../src/main/jsonschema/objectTypes/alert.json  |  19 -
 .../jsonschema/objectTypes/application.json     |  19 -
 .../main/jsonschema/objectTypes/article.json    |  19 -
 .../src/main/jsonschema/objectTypes/audio.json  |  19 -
 .../src/main/jsonschema/objectTypes/badge.json  |  19 -
 .../src/main/jsonschema/objectTypes/binary.json |  19 -
 .../main/jsonschema/objectTypes/bookmark.json   |  19 -
 .../main/jsonschema/objectTypes/comment.json    |  19 -
 .../src/main/jsonschema/objectTypes/device.json |  19 -
 .../src/main/jsonschema/objectTypes/event.json  |  51 ---
 .../src/main/jsonschema/objectTypes/file.json   |  25 --
 .../src/main/jsonschema/objectTypes/folder.json |  19 -
 .../src/main/jsonschema/objectTypes/game.json   |  19 -
 .../src/main/jsonschema/objectTypes/group.json  |  19 -
 .../src/main/jsonschema/objectTypes/image.json  |  22 --
 .../src/main/jsonschema/objectTypes/issue.json  |  25 --
 .../src/main/jsonschema/objectTypes/job.json    |  19 -
 .../src/main/jsonschema/objectTypes/list.json   |  28 --
 .../src/main/jsonschema/objectTypes/note.json   |  19 -
 .../src/main/jsonschema/objectTypes/offer.json  |  19 -
 .../jsonschema/objectTypes/organization.json    |  19 -
 .../src/main/jsonschema/objectTypes/page.json   |  19 -
 .../main/jsonschema/objectTypes/permission.json |  36 --
 .../src/main/jsonschema/objectTypes/person.json |  25 --
 .../jsonschema/objectTypes/photo-album.json     |  19 -
 .../src/main/jsonschema/objectTypes/photo.json  |  23 --
 .../src/main/jsonschema/objectTypes/place.json  |  39 --
 .../main/jsonschema/objectTypes/playlist.json   |  19 -
 .../main/jsonschema/objectTypes/process.json    |  19 -
 .../main/jsonschema/objectTypes/product.json    |  25 --
 .../main/jsonschema/objectTypes/property.json   |  48 ---
 .../main/jsonschema/objectTypes/question.json   |  28 --
 .../src/main/jsonschema/objectTypes/review.json |  22 --
 .../src/main/jsonschema/objectTypes/role.json   |  25 --
 .../main/jsonschema/objectTypes/service.json    |  19 -
 .../src/main/jsonschema/objectTypes/song.json   |  19 -
 .../src/main/jsonschema/objectTypes/status.json |  19 -
 .../src/main/jsonschema/objectTypes/task.json   |  40 --
 .../src/main/jsonschema/objectTypes/team.json   |  19 -
 .../src/main/jsonschema/objectTypes/video.json  |  19 -
 .../src/main/jsonschema/verbs/accept.json       |  24 --
 .../src/main/jsonschema/verbs/access.json       |  24 --
 .../src/main/jsonschema/verbs/acknowledge.json  |  24 --
 .../src/main/jsonschema/verbs/add.json          |  24 --
 .../src/main/jsonschema/verbs/agree.json        |  24 --
 .../src/main/jsonschema/verbs/append.json       |  24 --
 .../src/main/jsonschema/verbs/approve.json      |  24 --
 .../src/main/jsonschema/verbs/archive.json      |  24 --
 .../src/main/jsonschema/verbs/assign.json       |  24 --
 .../src/main/jsonschema/verbs/at.json           |  24 --
 .../src/main/jsonschema/verbs/attach.json       |  24 --
 .../src/main/jsonschema/verbs/attend.json       |  24 --
 .../src/main/jsonschema/verbs/author.json       |  24 --
 .../src/main/jsonschema/verbs/authorize.json    |  24 --
 .../src/main/jsonschema/verbs/borrow.json       |  24 --
 .../src/main/jsonschema/verbs/build.json        |  24 --
 .../src/main/jsonschema/verbs/cancel.json       |  24 --
 .../src/main/jsonschema/verbs/checkin.json      |  24 --
 .../src/main/jsonschema/verbs/close.json        |  24 --
 .../src/main/jsonschema/verbs/complete.json     |  24 --
 .../src/main/jsonschema/verbs/confirm.json      |  24 --
 .../src/main/jsonschema/verbs/consume.json      |  24 --
 .../src/main/jsonschema/verbs/create.json       |  24 --
 .../src/main/jsonschema/verbs/delete.json       |  24 --
 .../src/main/jsonschema/verbs/deliver.json      |  24 --
 .../src/main/jsonschema/verbs/deny.json         |  24 --
 .../src/main/jsonschema/verbs/disagree.json     |  24 --
 .../src/main/jsonschema/verbs/dislike.json      |  24 --
 .../src/main/jsonschema/verbs/experience.json   |  24 --
 .../src/main/jsonschema/verbs/favorite.json     |  24 --
 .../src/main/jsonschema/verbs/find.json         |  24 --
 .../jsonschema/verbs/flag-as-inappropriate.json |  24 --
 .../src/main/jsonschema/verbs/follow.json       |  24 --
 .../src/main/jsonschema/verbs/give.json         |  24 --
 .../src/main/jsonschema/verbs/host.json         |  24 --
 .../src/main/jsonschema/verbs/ignore.json       |  24 --
 .../src/main/jsonschema/verbs/insert.json       |  24 --
 .../src/main/jsonschema/verbs/install.json      |  24 --
 .../src/main/jsonschema/verbs/interact.json     |  24 --
 .../src/main/jsonschema/verbs/invite.json       |  24 --
 .../src/main/jsonschema/verbs/join.json         |  24 --
 .../src/main/jsonschema/verbs/leave.json        |  24 --
 .../src/main/jsonschema/verbs/like.json         |  24 --
 .../src/main/jsonschema/verbs/listen.json       |  24 --
 .../src/main/jsonschema/verbs/lose.json         |  24 --
 .../src/main/jsonschema/verbs/make-friend.json  |  24 --
 .../src/main/jsonschema/verbs/open.json         |  24 --
 .../src/main/jsonschema/verbs/play.json         |  24 --
 .../src/main/jsonschema/verbs/post.json         |  24 --
 .../src/main/jsonschema/verbs/present.json      |  24 --
 .../src/main/jsonschema/verbs/purchase.json     |  24 --
 .../src/main/jsonschema/verbs/qualify.json      |  24 --
 .../src/main/jsonschema/verbs/read.json         |  24 --
 .../src/main/jsonschema/verbs/receive.json      |  24 --
 .../src/main/jsonschema/verbs/reject.json       |  24 --
 .../main/jsonschema/verbs/remove-friend.json    |  24 --
 .../src/main/jsonschema/verbs/remove.json       |  24 --
 .../src/main/jsonschema/verbs/replace.json      |  24 --
 .../main/jsonschema/verbs/request-friend.json   |  24 --
 .../src/main/jsonschema/verbs/request.json      |  24 --
 .../src/main/jsonschema/verbs/resolve.json      |  24 --
 .../src/main/jsonschema/verbs/retract.json      |  24 --
 .../src/main/jsonschema/verbs/return.json       |  24 --
 .../src/main/jsonschema/verbs/rsvp-maybe.json   |  24 --
 .../src/main/jsonschema/verbs/rsvp-no.json      |  24 --
 .../src/main/jsonschema/verbs/rsvp-yes.json     |  24 --
 .../src/main/jsonschema/verbs/satisfy.json      |  24 --
 .../src/main/jsonschema/verbs/save.json         |  24 --
 .../src/main/jsonschema/verbs/schedule.json     |  24 --
 .../src/main/jsonschema/verbs/search.json       |  24 --
 .../src/main/jsonschema/verbs/sell.json         |  24 --
 .../src/main/jsonschema/verbs/send.json         |  24 --
 .../src/main/jsonschema/verbs/share.json        |  24 --
 .../src/main/jsonschema/verbs/sponsor.json      |  24 --
 .../src/main/jsonschema/verbs/start.json        |  24 --
 .../main/jsonschema/verbs/stop-following.json   |  24 --
 .../src/main/jsonschema/verbs/submit.json       |  24 --
 .../src/main/jsonschema/verbs/tag.json          |  24 --
 .../src/main/jsonschema/verbs/terminate.json    |  24 --
 .../src/main/jsonschema/verbs/tie.json          |  24 --
 .../src/main/jsonschema/verbs/unfavorite.json   |  24 --
 .../src/main/jsonschema/verbs/unlike.json       |  24 --
 .../src/main/jsonschema/verbs/unsatisfy.json    |  24 --
 .../src/main/jsonschema/verbs/unsave.json       |  24 --
 .../src/main/jsonschema/verbs/unshare.json      |  24 --
 .../src/main/jsonschema/verbs/update.json       |  34 --
 .../src/main/jsonschema/verbs/use.json          |  24 --
 .../src/main/jsonschema/verbs/watch.json        |  24 --
 .../src/main/jsonschema/verbs/win.json          |  24 --
 streams-schemas/src/main/xmlschema/activity.xsd |  94 -----
 .../schema/test/SchemaOrderingTests.java        | 146 --------
 .../streams/schema/test/SchemaStoreTests.java   |  76 ----
 .../src/test/resources/activities/accept.json   |  16 -
 .../src/test/resources/activities/access.json   |  17 -
 .../test/resources/activities/acknowledge.json  |  16 -
 .../src/test/resources/activities/add.json      |  21 --
 .../src/test/resources/activities/agree.json    |  15 -
 .../src/test/resources/activities/append.json   |  16 -
 .../src/test/resources/activities/approve.json  |  20 -
 .../src/test/resources/activities/archive.json  |  15 -
 .../src/test/resources/activities/assign.json   |  20 -
 .../src/test/resources/activities/at.json       |  15 -
 .../src/test/resources/activities/attach.json   |  20 -
 .../src/test/resources/activities/attend.json   |  15 -
 .../src/test/resources/activities/author.json   |  15 -
 .../test/resources/activities/authorize.json    |  23 --
 .../src/test/resources/activities/borrow.json   |  21 --
 .../src/test/resources/activities/build.json    |  16 -
 .../src/test/resources/activities/cancel.json   |  16 -
 .../src/test/resources/activities/checkin.json  |  16 -
 .../src/test/resources/activities/close.json    |  16 -
 .../src/test/resources/activities/complete.json |  16 -
 .../src/test/resources/activities/confirm.json  |  17 -
 .../src/test/resources/activities/consume.json  |  16 -
 .../src/test/resources/activities/create.json   |  15 -
 .../src/test/resources/activities/delete.json   |  16 -
 .../src/test/resources/activities/deliver.json  |  20 -
 .../src/test/resources/activities/deny.json     |  23 --
 .../src/test/resources/activities/disagree.json |  30 --
 .../src/test/resources/activities/dislike.json  |  15 -
 .../test/resources/activities/experience.json   |  16 -
 .../src/test/resources/activities/favorite.json |  15 -
 .../src/test/resources/activities/find.json     |  19 -
 .../activities/flag-as-inappropriate.json       |  24 --
 .../src/test/resources/activities/follow.json   |  15 -
 .../src/test/resources/activities/give.json     |  28 --
 .../src/test/resources/activities/host.json     |  15 -
 .../src/test/resources/activities/ignore.json   |  15 -
 .../src/test/resources/activities/insert.json   |  19 -
 .../src/test/resources/activities/install.json  |  18 -
 .../src/test/resources/activities/interact.json |  16 -
 .../src/test/resources/activities/invite.json   |  19 -
 .../src/test/resources/activities/join.json     |  15 -
 .../src/test/resources/activities/leave.json    |  15 -
 .../src/test/resources/activities/like.json     |  22 --
 .../src/test/resources/activities/listen.json   |  15 -
 .../src/test/resources/activities/lose.json     |  15 -
 .../test/resources/activities/make-friend.json  |  15 -
 .../src/test/resources/activities/open.json     |  15 -
 .../src/test/resources/activities/play.json     |  15 -
 .../src/test/resources/activities/post.json     |  25 --
 .../src/test/resources/activities/present.json  |  15 -
 .../src/test/resources/activities/purchase.json |  16 -
 .../src/test/resources/activities/qualify.json  |  15 -
 .../src/test/resources/activities/read.json     |  16 -
 .../src/test/resources/activities/receive.json  |  16 -
 .../src/test/resources/activities/reject.json   |  15 -
 .../resources/activities/remove-friend.json     |  15 -
 .../src/test/resources/activities/remove.json   |  23 --
 .../src/test/resources/activities/replace.json  |  19 -
 .../resources/activities/request-friend.json    |  16 -
 .../src/test/resources/activities/request.json  |  23 --
 .../src/test/resources/activities/resolve.json  |  15 -
 .../src/test/resources/activities/retract.json  |  26 --
 .../src/test/resources/activities/return.json   |  19 -
 .../test/resources/activities/rsvp-maybe.json   |  16 -
 .../src/test/resources/activities/rsvp-no.json  |  16 -
 .../src/test/resources/activities/rsvp-yes.json |  16 -
 .../src/test/resources/activities/satisfy.json  |  21 --
 .../src/test/resources/activities/save.json     |  20 -
 .../src/test/resources/activities/schedule.json |  15 -
 .../src/test/resources/activities/search.json   |  21 --
 .../src/test/resources/activities/sell.json     |  19 -
 .../src/test/resources/activities/send.json     |  19 -
 .../src/test/resources/activities/share.json    |  16 -
 .../src/test/resources/activities/sponsor.json  |  17 -
 .../src/test/resources/activities/start.json    |  15 -
 .../resources/activities/stop-following.json    |  15 -
 .../src/test/resources/activities/submit.json   |  15 -
 .../src/test/resources/activities/tag.json      |  19 -
 .../test/resources/activities/terminate.json    |  15 -
 .../src/test/resources/activities/tie.json      |  24 --
 .../test/resources/activities/unfavorite.json   |  15 -
 .../src/test/resources/activities/unlike.json   |  15 -
 .../test/resources/activities/unsatisfy.json    |  20 -
 .../src/test/resources/activities/unsave.json   |  15 -
 .../src/test/resources/activities/unshare.json  |  15 -
 .../src/test/resources/activities/update.json   |  15 -
 .../src/test/resources/activities/use.json      |  15 -
 .../src/test/resources/activities/watch.json    |  16 -
 .../src/test/resources/activities/win.json      |  15 -
 .../src/test/resources/media_link.json          |   7 -
 .../src/test/resources/objects/event.json       |  18 -
 .../src/test/resources/objects/group.json       |  16 -
 .../src/test/resources/objects/issue.json       |   9 -
 .../src/test/resources/objects/note.json        |  12 -
 .../src/test/resources/objects/permission.json  |   9 -
 .../src/test/resources/objects/place.json       |   9 -
 .../src/test/resources/objects/task.json        |  16 -
 .../src/test/resources/objects/video.json       |   8 -
 .../streams-schema-activitystreams/pom.xml      |  82 ++++
 .../src/main/jsonschema/activity.json           | 108 ++++++
 .../src/main/jsonschema/collection.json         |  47 +++
 .../src/main/jsonschema/media_link.json         |  34 ++
 .../src/main/jsonschema/object.json             |  98 +++++
 .../src/main/jsonschema/objectTypes/alert.json  |  19 +
 .../jsonschema/objectTypes/application.json     |  19 +
 .../main/jsonschema/objectTypes/article.json    |  19 +
 .../src/main/jsonschema/objectTypes/audio.json  |  19 +
 .../src/main/jsonschema/objectTypes/badge.json  |  19 +
 .../src/main/jsonschema/objectTypes/binary.json |  19 +
 .../main/jsonschema/objectTypes/bookmark.json   |  19 +
 .../main/jsonschema/objectTypes/comment.json    |  19 +
 .../src/main/jsonschema/objectTypes/device.json |  19 +
 .../src/main/jsonschema/objectTypes/event.json  |  51 +++
 .../src/main/jsonschema/objectTypes/file.json   |  25 ++
 .../src/main/jsonschema/objectTypes/folder.json |  19 +
 .../src/main/jsonschema/objectTypes/game.json   |  19 +
 .../src/main/jsonschema/objectTypes/group.json  |  19 +
 .../src/main/jsonschema/objectTypes/image.json  |  22 ++
 .../src/main/jsonschema/objectTypes/issue.json  |  25 ++
 .../src/main/jsonschema/objectTypes/job.json    |  19 +
 .../src/main/jsonschema/objectTypes/list.json   |  28 ++
 .../src/main/jsonschema/objectTypes/note.json   |  19 +
 .../src/main/jsonschema/objectTypes/offer.json  |  19 +
 .../jsonschema/objectTypes/organization.json    |  19 +
 .../src/main/jsonschema/objectTypes/page.json   |  19 +
 .../main/jsonschema/objectTypes/permission.json |  36 ++
 .../src/main/jsonschema/objectTypes/person.json |  25 ++
 .../jsonschema/objectTypes/photo-album.json     |  19 +
 .../src/main/jsonschema/objectTypes/photo.json  |  23 ++
 .../src/main/jsonschema/objectTypes/place.json  |  39 ++
 .../main/jsonschema/objectTypes/playlist.json   |  19 +
 .../main/jsonschema/objectTypes/process.json    |  19 +
 .../main/jsonschema/objectTypes/product.json    |  25 ++
 .../main/jsonschema/objectTypes/property.json   |  48 +++
 .../main/jsonschema/objectTypes/question.json   |  28 ++
 .../src/main/jsonschema/objectTypes/review.json |  22 ++
 .../src/main/jsonschema/objectTypes/role.json   |  25 ++
 .../main/jsonschema/objectTypes/service.json    |  19 +
 .../src/main/jsonschema/objectTypes/song.json   |  19 +
 .../src/main/jsonschema/objectTypes/status.json |  19 +
 .../src/main/jsonschema/objectTypes/task.json   |  40 ++
 .../src/main/jsonschema/objectTypes/team.json   |  19 +
 .../src/main/jsonschema/objectTypes/video.json  |  19 +
 .../src/main/jsonschema/verbs/accept.json       |  24 ++
 .../src/main/jsonschema/verbs/access.json       |  24 ++
 .../src/main/jsonschema/verbs/acknowledge.json  |  24 ++
 .../src/main/jsonschema/verbs/add.json          |  24 ++
 .../src/main/jsonschema/verbs/agree.json        |  24 ++
 .../src/main/jsonschema/verbs/append.json       |  24 ++
 .../src/main/jsonschema/verbs/approve.json      |  24 ++
 .../src/main/jsonschema/verbs/archive.json      |  24 ++
 .../src/main/jsonschema/verbs/assign.json       |  24 ++
 .../src/main/jsonschema/verbs/at.json           |  24 ++
 .../src/main/jsonschema/verbs/attach.json       |  24 ++
 .../src/main/jsonschema/verbs/attend.json       |  24 ++
 .../src/main/jsonschema/verbs/author.json       |  24 ++
 .../src/main/jsonschema/verbs/authorize.json    |  24 ++
 .../src/main/jsonschema/verbs/borrow.json       |  24 ++
 .../src/main/jsonschema/verbs/build.json        |  24 ++
 .../src/main/jsonschema/verbs/cancel.json       |  24 ++
 .../src/main/jsonschema/verbs/checkin.json      |  24 ++
 .../src/main/jsonschema/verbs/close.json        |  24 ++
 .../src/main/jsonschema/verbs/complete.json     |  24 ++
 .../src/main/jsonschema/verbs/confirm.json      |  24 ++
 .../src/main/jsonschema/verbs/consume.json      |  24 ++
 .../src/main/jsonschema/verbs/create.json       |  24 ++
 .../src/main/jsonschema/verbs/delete.json       |  24 ++
 .../src/main/jsonschema/verbs/deliver.json      |  24 ++
 .../src/main/jsonschema/verbs/deny.json         |  24 ++
 .../src/main/jsonschema/verbs/disagree.json     |  24 ++
 .../src/main/jsonschema/verbs/dislike.json      |  24 ++
 .../src/main/jsonschema/verbs/experience.json   |  24 ++
 .../src/main/jsonschema/verbs/favorite.json     |  24 ++
 .../src/main/jsonschema/verbs/find.json         |  24 ++
 .../jsonschema/verbs/flag-as-inappropriate.json |  24 ++
 .../src/main/jsonschema/verbs/follow.json       |  24 ++
 .../src/main/jsonschema/verbs/give.json         |  24 ++
 .../src/main/jsonschema/verbs/host.json         |  24 ++
 .../src/main/jsonschema/verbs/ignore.json       |  24 ++
 .../src/main/jsonschema/verbs/insert.json       |  24 ++
 .../src/main/jsonschema/verbs/install.json      |  24 ++
 .../src/main/jsonschema/verbs/interact.json     |  24 ++
 .../src/main/jsonschema/verbs/invite.json       |  24 ++
 .../src/main/jsonschema/verbs/join.json         |  24 ++
 .../src/main/jsonschema/verbs/leave.json        |  24 ++
 .../src/main/jsonschema/verbs/like.json         |  24 ++
 .../src/main/jsonschema/verbs/listen.json       |  24 ++
 .../src/main/jsonschema/verbs/lose.json         |  24 ++
 .../src/main/jsonschema/verbs/make-friend.json  |  24 ++
 .../src/main/jsonschema/verbs/open.json         |  24 ++
 .../src/main/jsonschema/verbs/play.json         |  24 ++
 .../src/main/jsonschema/verbs/post.json         |  24 ++
 .../src/main/jsonschema/verbs/present.json      |  24 ++
 .../src/main/jsonschema/verbs/purchase.json     |  24 ++
 .../src/main/jsonschema/verbs/qualify.json      |  24 ++
 .../src/main/jsonschema/verbs/read.json         |  24 ++
 .../src/main/jsonschema/verbs/receive.json      |  24 ++
 .../src/main/jsonschema/verbs/reject.json       |  24 ++
 .../main/jsonschema/verbs/remove-friend.json    |  24 ++
 .../src/main/jsonschema/verbs/remove.json       |  24 ++
 .../src/main/jsonschema/verbs/replace.json      |  24 ++
 .../main/jsonschema/verbs/request-friend.json   |  24 ++
 .../src/main/jsonschema/verbs/request.json      |  24 ++
 .../src/main/jsonschema/verbs/resolve.json      |  24 ++
 .../src/main/jsonschema/verbs/retract.json      |  24 ++
 .../src/main/jsonschema/verbs/return.json       |  24 ++
 .../src/main/jsonschema/verbs/rsvp-maybe.json   |  24 ++
 .../src/main/jsonschema/verbs/rsvp-no.json      |  24 ++
 .../src/main/jsonschema/verbs/rsvp-yes.json     |  24 ++
 .../src/main/jsonschema/verbs/satisfy.json      |  24 ++
 .../src/main/jsonschema/verbs/save.json         |  24 ++
 .../src/main/jsonschema/verbs/schedule.json     |  24 ++
 .../src/main/jsonschema/verbs/search.json       |  24 ++
 .../src/main/jsonschema/verbs/sell.json         |  24 ++
 .../src/main/jsonschema/verbs/send.json         |  24 ++
 .../src/main/jsonschema/verbs/share.json        |  24 ++
 .../src/main/jsonschema/verbs/sponsor.json      |  24 ++
 .../src/main/jsonschema/verbs/start.json        |  24 ++
 .../main/jsonschema/verbs/stop-following.json   |  24 ++
 .../src/main/jsonschema/verbs/submit.json       |  24 ++
 .../src/main/jsonschema/verbs/tag.json          |  24 ++
 .../src/main/jsonschema/verbs/terminate.json    |  24 ++
 .../src/main/jsonschema/verbs/tie.json          |  24 ++
 .../src/main/jsonschema/verbs/unfavorite.json   |  24 ++
 .../src/main/jsonschema/verbs/unlike.json       |  24 ++
 .../src/main/jsonschema/verbs/unsatisfy.json    |  24 ++
 .../src/main/jsonschema/verbs/unsave.json       |  24 ++
 .../src/main/jsonschema/verbs/unshare.json      |  24 ++
 .../src/main/jsonschema/verbs/update.json       |  34 ++
 .../src/main/jsonschema/verbs/use.json          |  24 ++
 .../src/main/jsonschema/verbs/watch.json        |  24 ++
 .../src/main/jsonschema/verbs/win.json          |  24 ++
 .../src/main/xmlschema/activity.xsd             |  94 +++++
 streams-util/pom.xml                            |  89 ++++-
 .../java/org/apache/streams/util/GuidUtils.java |   2 +-
 .../org/apache/streams/util/RegexUtils.java     |   3 +
 .../apache/streams/util/SerializationUtil.java  |   3 +-
 .../apache/streams/util/schema/FieldType.java   |  14 +
 .../apache/streams/util/schema/FieldUtil.java   |  34 ++
 .../apache/streams/util/schema/FileUtil.java    |  77 ++++
 .../streams/util/schema/GenerationConfig.java   | 116 ++++++
 .../org/apache/streams/util/schema/Schema.java  |  57 +++
 .../apache/streams/util/schema/SchemaStore.java |  42 +++
 .../streams/util/schema/SchemaStoreImpl.java    | 347 +++++++++++++++++
 .../apache/streams/util/schema/SchemaUtil.java  |  49 +++
 .../org/apache/streams/util/schema/URIUtil.java |  30 ++
 .../util/schema/test/SchemaOrderingTest.java    | 150 ++++++++
 .../util/schema/test/SchemaStoreTest.java       |  71 ++++
 .../src/test/resources/activities/accept.json   |  16 +
 .../src/test/resources/activities/access.json   |  17 +
 .../test/resources/activities/acknowledge.json  |  16 +
 .../src/test/resources/activities/add.json      |  21 ++
 .../src/test/resources/activities/agree.json    |  15 +
 .../src/test/resources/activities/append.json   |  16 +
 .../src/test/resources/activities/approve.json  |  20 +
 .../src/test/resources/activities/archive.json  |  15 +
 .../src/test/resources/activities/assign.json   |  20 +
 .../src/test/resources/activities/at.json       |  15 +
 .../src/test/resources/activities/attach.json   |  20 +
 .../src/test/resources/activities/attend.json   |  15 +
 .../src/test/resources/activities/author.json   |  15 +
 .../test/resources/activities/authorize.json    |  23 ++
 .../src/test/resources/activities/borrow.json   |  21 ++
 .../src/test/resources/activities/build.json    |  16 +
 .../src/test/resources/activities/cancel.json   |  16 +
 .../src/test/resources/activities/checkin.json  |  16 +
 .../src/test/resources/activities/close.json    |  16 +
 .../src/test/resources/activities/complete.json |  16 +
 .../src/test/resources/activities/confirm.json  |  17 +
 .../src/test/resources/activities/consume.json  |  16 +
 .../src/test/resources/activities/create.json   |  15 +
 .../src/test/resources/activities/delete.json   |  16 +
 .../src/test/resources/activities/deliver.json  |  20 +
 .../src/test/resources/activities/deny.json     |  23 ++
 .../src/test/resources/activities/disagree.json |  30 ++
 .../src/test/resources/activities/dislike.json  |  15 +
 .../test/resources/activities/experience.json   |  16 +
 .../src/test/resources/activities/favorite.json |  15 +
 .../src/test/resources/activities/find.json     |  19 +
 .../activities/flag-as-inappropriate.json       |  24 ++
 .../src/test/resources/activities/follow.json   |  15 +
 .../src/test/resources/activities/give.json     |  28 ++
 .../src/test/resources/activities/host.json     |  15 +
 .../src/test/resources/activities/ignore.json   |  15 +
 .../src/test/resources/activities/insert.json   |  19 +
 .../src/test/resources/activities/install.json  |  18 +
 .../src/test/resources/activities/interact.json |  16 +
 .../src/test/resources/activities/invite.json   |  19 +
 .../src/test/resources/activities/join.json     |  15 +
 .../src/test/resources/activities/leave.json    |  15 +
 .../src/test/resources/activities/like.json     |  22 ++
 .../src/test/resources/activities/listen.json   |  15 +
 .../src/test/resources/activities/lose.json     |  15 +
 .../test/resources/activities/make-friend.json  |  15 +
 .../src/test/resources/activities/open.json     |  15 +
 .../src/test/resources/activities/play.json     |  15 +
 .../src/test/resources/activities/post.json     |  25 ++
 .../src/test/resources/activities/present.json  |  15 +
 .../src/test/resources/activities/purchase.json |  16 +
 .../src/test/resources/activities/qualify.json  |  15 +
 .../src/test/resources/activities/read.json     |  16 +
 .../src/test/resources/activities/receive.json  |  16 +
 .../src/test/resources/activities/reject.json   |  15 +
 .../resources/activities/remove-friend.json     |  15 +
 .../src/test/resources/activities/remove.json   |  23 ++
 .../src/test/resources/activities/replace.json  |  19 +
 .../resources/activities/request-friend.json    |  16 +
 .../src/test/resources/activities/request.json  |  23 ++
 .../src/test/resources/activities/resolve.json  |  15 +
 .../src/test/resources/activities/retract.json  |  26 ++
 .../src/test/resources/activities/return.json   |  19 +
 .../test/resources/activities/rsvp-maybe.json   |  16 +
 .../src/test/resources/activities/rsvp-no.json  |  16 +
 .../src/test/resources/activities/rsvp-yes.json |  16 +
 .../src/test/resources/activities/satisfy.json  |  21 ++
 .../src/test/resources/activities/save.json     |  20 +
 .../src/test/resources/activities/schedule.json |  15 +
 .../src/test/resources/activities/search.json   |  21 ++
 .../src/test/resources/activities/sell.json     |  19 +
 .../src/test/resources/activities/send.json     |  19 +
 .../src/test/resources/activities/share.json    |  16 +
 .../src/test/resources/activities/sponsor.json  |  17 +
 .../src/test/resources/activities/start.json    |  15 +
 .../resources/activities/stop-following.json    |  15 +
 .../src/test/resources/activities/submit.json   |  15 +
 .../src/test/resources/activities/tag.json      |  19 +
 .../test/resources/activities/terminate.json    |  15 +
 .../src/test/resources/activities/tie.json      |  24 ++
 .../test/resources/activities/unfavorite.json   |  15 +
 .../src/test/resources/activities/unlike.json   |  15 +
 .../test/resources/activities/unsatisfy.json    |  20 +
 .../src/test/resources/activities/unsave.json   |  15 +
 .../src/test/resources/activities/unshare.json  |  15 +
 .../src/test/resources/activities/update.json   |  15 +
 .../src/test/resources/activities/use.json      |  15 +
 .../src/test/resources/activities/watch.json    |  16 +
 .../src/test/resources/activities/win.json      |  15 +
 streams-util/src/test/resources/media_link.json |   7 +
 .../src/test/resources/objects/event.json       |  18 +
 .../src/test/resources/objects/group.json       |  16 +
 .../src/test/resources/objects/issue.json       |   9 +
 .../src/test/resources/objects/note.json        |  12 +
 .../src/test/resources/objects/permission.json  |   9 +
 .../src/test/resources/objects/place.json       |   9 +
 .../src/test/resources/objects/task.json        |  16 +
 .../src/test/resources/objects/video.json       |   8 +
 553 files changed, 7304 insertions(+), 7432 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-contrib/streams-persist-cassandra/src/site/resources/META_INF/spring/streams-cassandra-context.xml
----------------------------------------------------------------------
diff --git 
a/streams-contrib/streams-persist-cassandra/src/site/resources/META_INF/spring/streams-cassandra-context.xml
 
b/streams-contrib/streams-persist-cassandra/src/site/resources/META_INF/spring/streams-cassandra-context.xml
deleted file mode 100644
index 842c918..0000000
--- 
a/streams-contrib/streams-persist-cassandra/src/site/resources/META_INF/spring/streams-cassandra-context.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-  ~ 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
-  ~
-  ~   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:xsi="http://www.w3.org/2001/XMLSchema-instance";
-        xmlns="http://www.springframework.org/schema/beans";
-        xmlns:context="http://www.springframework.org/schema/context";
-        xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
-        http://www.springframework.org/schema/context 
http://www.springframework.org/schema/context/spring-context.xsd";>
-
-</beans>

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-plugins/streams-plugin-cassandra/pom.xml
----------------------------------------------------------------------
diff --git a/streams-plugins/streams-plugin-cassandra/pom.xml 
b/streams-plugins/streams-plugin-cassandra/pom.xml
index b2dbf36..d9d3f91 100644
--- a/streams-plugins/streams-plugin-cassandra/pom.xml
+++ b/streams-plugins/streams-plugin-cassandra/pom.xml
@@ -54,10 +54,17 @@
         </dependency>
         <dependency>
             <groupId>org.apache.streams</groupId>
-            <artifactId>streams-schemas</artifactId>
+            <artifactId>streams-util</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
+            <groupId>org.apache.streams</groupId>
+            <artifactId>streams-schema-activitystreams</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>com.google.guava</groupId>
             <artifactId>guava</artifactId>
         </dependency>
@@ -230,9 +237,9 @@
                         </goals>
                         <configuration>
                             
<includeGroupIds>org.apache.streams</includeGroupIds>
-                            
<includeArtifactIds>streams-schemas</includeArtifactIds>
+                            
<includeArtifactIds>streams-schema-activitystreams</includeArtifactIds>
                             <includes>**/*.json</includes>
-                            
<outputDirectory>${project.build.directory}/test-classes/streams-schemas</outputDirectory>
+                            
<outputDirectory>${project.build.directory}/test-classes/streams-schema-activitystreams</outputDirectory>
                         </configuration>
                     </execution>
                 </executions>

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraGenerationConfig.java
----------------------------------------------------------------------
diff --git 
a/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraGenerationConfig.java
 
b/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraGenerationConfig.java
index 28e20e4..1950796 100644
--- 
a/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraGenerationConfig.java
+++ 
b/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraGenerationConfig.java
@@ -1,6 +1,6 @@
 package org.apache.streams.plugins.cassandra;
 
-import org.apache.streams.schema.GenerationConfig;
+import org.apache.streams.util.schema.GenerationConfig;
 import org.jsonschema2pojo.DefaultGenerationConfig;
 import org.jsonschema2pojo.util.URLUtil;
 

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraResourceGenerator.java
----------------------------------------------------------------------
diff --git 
a/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraResourceGenerator.java
 
b/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraResourceGenerator.java
index 787ae02..7889bdc 100644
--- 
a/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraResourceGenerator.java
+++ 
b/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraResourceGenerator.java
@@ -7,12 +7,12 @@ import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import com.google.common.base.Strings;
 import com.google.common.collect.Lists;
-import org.apache.streams.schema.FieldType;
-import org.apache.streams.schema.FieldUtil;
-import org.apache.streams.schema.GenerationConfig;
-import org.apache.streams.schema.Schema;
-import org.apache.streams.schema.SchemaStore;
-import org.apache.streams.schema.URIUtil;
+import org.apache.streams.util.schema.FieldType;
+import org.apache.streams.util.schema.FieldUtil;
+import org.apache.streams.util.schema.GenerationConfig;
+import org.apache.streams.util.schema.Schema;
+import org.apache.streams.util.schema.SchemaStore;
+import org.apache.streams.util.schema.SchemaStoreImpl;
 import org.jsonschema2pojo.util.URLUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -27,11 +27,10 @@ import java.util.Map;
 
 import static com.google.common.base.Preconditions.checkNotNull;
 import static org.apache.commons.lang3.StringUtils.defaultString;
-import static org.apache.streams.schema.FileUtil.dropExtension;
-import static org.apache.streams.schema.FileUtil.dropSourcePathPrefix;
-import static org.apache.streams.schema.FileUtil.resolveRecursive;
-import static org.apache.streams.schema.FileUtil.swapExtension;
-import static org.apache.streams.schema.FileUtil.writeFile;
+import static org.apache.streams.util.schema.FileUtil.dropExtension;
+import static org.apache.streams.util.schema.FileUtil.dropSourcePathPrefix;
+import static org.apache.streams.util.schema.FileUtil.resolveRecursive;
+import static org.apache.streams.util.schema.FileUtil.writeFile;
 
 /**
  * Created by sblackmon on 5/3/16.
@@ -44,14 +43,14 @@ public class StreamsCassandraResourceGenerator implements 
Runnable {
 
     private StreamsCassandraGenerationConfig config;
 
-    private SchemaStore schemaStore = new SchemaStore();
+    private SchemaStore schemaStore = new SchemaStoreImpl();
 
     private int currentDepth = 0;
 
     public static void main(String[] args) {
         StreamsCassandraGenerationConfig config = new 
StreamsCassandraGenerationConfig();
 
-        String sourceDirectory = "./target/test-classes/activities";
+        String sourceDirectory = "./src/main/jsonschema";
         String targetDirectory = "./target/generated-resources/cassandra";
 
         if( args.length > 0 )
@@ -63,16 +62,7 @@ public class StreamsCassandraResourceGenerator implements 
Runnable {
         config.setTargetDirectory(targetDirectory);
 
         StreamsCassandraResourceGenerator streamsCassandraResourceGenerator = 
new StreamsCassandraResourceGenerator(config);
-        Thread thread = new Thread(streamsCassandraResourceGenerator);
-        thread.start();
-        try {
-            thread.join();
-        } catch (InterruptedException e) {
-            LOGGER.error("InterruptedException", e);
-        } catch (Exception e) {
-            LOGGER.error("Exception", e);
-        }
-        return;
+        streamsCassandraResourceGenerator.run();
     }
 
     public StreamsCassandraResourceGenerator(StreamsCassandraGenerationConfig 
config) {
@@ -122,15 +112,15 @@ public class StreamsCassandraResourceGenerator implements 
Runnable {
                     resourcePath = dropSourcePathPrefix(resourcePath, 
sourcePath);
                 }
 
-                LOGGER.info("Processing {}:", resourcePath);
-
                 String resourceId = schemaSymbol(schema);
 
+                LOGGER.info("Processing {}", resourcePath);
+
                 String resourceContent = generateResource(schema, resourceId);
 
                 typesContent.append(resourceContent);
 
-                LOGGER.info("Added {}:", resourceId);
+                LOGGER.info("Added {}", resourceId);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraResourceGeneratorMojo.java
----------------------------------------------------------------------
diff --git 
a/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraResourceGeneratorMojo.java
 
b/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraResourceGeneratorMojo.java
index 2e9a37f..5cf814d 100644
--- 
a/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraResourceGeneratorMojo.java
+++ 
b/streams-plugins/streams-plugin-cassandra/src/main/java/org/apache/streams/plugins/cassandra/StreamsCassandraResourceGeneratorMojo.java
@@ -15,10 +15,10 @@ import org.slf4j.LoggerFactory;
 import java.io.File;
 import java.util.List;
 
-@Mojo(  name = "cassandra",
+@Mojo(  name = "generate-resources",
         defaultPhase = LifecyclePhase.GENERATE_RESOURCES
 )
-@Execute(   goal = "cassandra",
+@Execute(   goal = "generate-resources",
             phase = LifecyclePhase.GENERATE_RESOURCES
 )
 public class StreamsCassandraResourceGeneratorMojo extends AbstractMojo {
@@ -30,15 +30,6 @@ public class StreamsCassandraResourceGeneratorMojo extends 
AbstractMojo {
     @Component
     private MavenProject project;
 
-//    @Component
-//    private Settings settings;
-//
-//    @Parameter( defaultValue = "${localRepository}", readonly = true, 
required = true )
-//    protected ArtifactRepository localRepository;
-//
-//    @Parameter( defaultValue = "${plugin}", readonly = true ) // Maven 3 only
-//    private PluginDescriptor plugin;
-//
     @Parameter( defaultValue = "${project.basedir}", readonly = true )
     private File basedir;
 
@@ -65,29 +56,7 @@ public class StreamsCassandraResourceGeneratorMojo extends 
AbstractMojo {
 
         StreamsCassandraResourceGenerator streamsCassandraResourceGenerator = 
new StreamsCassandraResourceGenerator(config);
 
-        Thread.UncaughtExceptionHandler h = new 
Thread.UncaughtExceptionHandler() {
-            public void uncaughtException(Thread th, Throwable ex) {
-                LOGGER.error("Exception", ex);
-                mojoFailureException = new MojoFailureException("Exception", 
ex);
-            }
-        };
-        Thread.setDefaultUncaughtExceptionHandler(h);
-        Thread thread = new Thread(streamsCassandraResourceGenerator);
-        thread.setUncaughtExceptionHandler(h);
-        try {
-            thread.start();
-            thread.join();
-        } catch (InterruptedException e) {
-            LOGGER.error("InterruptedException", e);
-        } catch (Exception e) {
-            LOGGER.error("Exception", e);
-            mojoFailureException = new MojoFailureException("Exception", e);
-        }
-
-        if( mojoFailureException != null )
-            throw mojoFailureException;
-
-        return;
+        streamsCassandraResourceGenerator.run();
     }
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-plugins/streams-plugin-cassandra/src/site/markdown/index.md
----------------------------------------------------------------------
diff --git 
a/streams-plugins/streams-plugin-cassandra/src/site/markdown/index.md 
b/streams-plugins/streams-plugin-cassandra/src/site/markdown/index.md
index d0c2129..0e8ecf3 100644
--- a/streams-plugins/streams-plugin-cassandra/src/site/markdown/index.md
+++ b/streams-plugins/streams-plugin-cassandra/src/site/markdown/index.md
@@ -3,17 +3,31 @@ org.apache.streams.plugins:streams-plugin-cassandra
 
 streams-plugin-cassandra generates resources from json schemas to assist with 
indexing of json data using Apache Cassandra.
 
-#### Usage
+### Usage
+
+##### Maven
 
 Run within a module containing a src/main/jsonschema directory
 
     mvn 
org.apache.streams.plugins:streams-plugin-cassandra:0.3-incubating-SNAPSHOT:cassandra
 
-Output will be placed in target/generated-resources/cassandra by default
+[streams-plugin-cassandra/pom.xml](streams-plugin-cassandra/pom.xml 
"streams-plugin-cassandra/pom.xml")
 
-#### Example
+##### SDK
 
-[streams-plugin-cassandra/pom.xml](streams-plugin-cassandra/pom.xml 
"streams-plugin-cassandra/pom.xml")
+Embed within your own java code
+
+    StreamsCassandraGenerationConfig config = new 
StreamsCassandraGenerationConfig();
+    config.setSourceDirectory("src/main/jsonschema");
+    config.setTargetDirectory("target/generated-resources");
+    StreamsCassandraResourceGenerator generator = new 
StreamsCassandraResourceGenerator(config);
+    generator.run();
+    
+##### CLI
+    
+Run from CLI without Maven
+
+    java -jar streams-plugin-cassandra-jar-with-dependencies.jar 
StreamsCassandraResourceGenerator src/main/jsonschema target/generated-resources
 
 #### Documentation
 

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorCLITest.java
----------------------------------------------------------------------
diff --git 
a/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorCLITest.java
 
b/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorCLITest.java
index 465a326..74c1152 100644
--- 
a/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorCLITest.java
+++ 
b/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorCLITest.java
@@ -20,10 +20,10 @@ import static 
org.apache.streams.plugins.cassandra.test.StreamsCassandraResource
 public class StreamsCassandraResourceGeneratorCLITest {
 
     @Test
-    public void testStreamsHiveResourceGeneratorCLI() throws Exception {
+    public void testStreamsCassandraResourceGeneratorCLI() throws Exception {
 
-        String sourceDirectory = "target/test-classes/streams-schemas";
-        String targetDirectory = "target/generated-resources/cassandra-cli";
+        String sourceDirectory = 
"target/test-classes/streams-schema-activitystreams";
+        String targetDirectory = "target/generated-resources/test-cli";
 
         List<String> argsList = Lists.newArrayList(sourceDirectory, 
targetDirectory);
         StreamsCassandraResourceGenerator.main(argsList.toArray(new 
String[0]));
@@ -39,7 +39,9 @@ public class StreamsCassandraResourceGeneratorCLITest {
         Collection<File> outputCollection = Lists.newArrayList(outputIterator);
         assert( outputCollection.size() == 1 );
 
-        Path path = Paths.get("types.cql");
+        Path path = 
Paths.get(testOutput.getAbsolutePath()).resolve("types.cql");
+
+        assert( path.toFile().exists() );
 
         String typesCqlBytes = new String(
                 java.nio.file.Files.readAllBytes(path));

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorMojoTest.java
----------------------------------------------------------------------
diff --git 
a/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorMojoTest.java
 
b/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorMojoTest.java
index aad069f..ee0ce99 100644
--- 
a/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorMojoTest.java
+++ 
b/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorMojoTest.java
@@ -52,7 +52,9 @@ public class StreamsCassandraResourceGeneratorMojoTest 
extends TestCase {
 
         verifier.resetStreams();
 
-        File testOutput = new File( "./target/generated-resources/test-mojo");
+        Path testOutputPath = 
Paths.get(testDir.getAbsolutePath()).resolve("target/generated-resources/test-mojo");
+
+        File testOutput = testOutputPath.toFile();
 
         assert( testOutput != null );
         assert( testOutput.exists() == true );
@@ -63,13 +65,14 @@ public class StreamsCassandraResourceGeneratorMojoTest 
extends TestCase {
         Collection<File> outputCollection = Lists.newArrayList(outputIterator);
         assert( outputCollection.size() == 1 );
 
-        Path path = Paths.get("./target/generated-sources/test/types.cql");
+        Path path = testOutputPath.resolve("types.cql");
+
+        assert( path.toFile().exists() );
 
         String typesCqlBytes = new String(
                 java.nio.file.Files.readAllBytes(path));
 
         assert( StringUtils.countMatches(typesCqlBytes, "CREATE TYPE") == 133 
);
 
-        assert( !typesCqlBytes.contains("IDK"));
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorTest.java
----------------------------------------------------------------------
diff --git 
a/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorTest.java
 
b/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorTest.java
index d46eaa6..daf85ae 100644
--- 
a/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorTest.java
+++ 
b/streams-plugins/streams-plugin-cassandra/src/test/java/org/apache/streams/plugins/cassandra/test/StreamsCassandraResourceGeneratorTest.java
@@ -1,15 +1,12 @@
 package org.apache.streams.plugins.cassandra.test;
 
-import com.google.common.base.Charsets;
 import com.google.common.base.Predicate;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 import com.google.common.io.Files;
-import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.streams.plugins.cassandra.StreamsCassandraGenerationConfig;
 import org.apache.streams.plugins.cassandra.StreamsCassandraResourceGenerator;
-import org.junit.Assert;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -19,10 +16,6 @@ import java.io.File;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import static org.apache.streams.schema.FileUtil.dropSourcePathPrefix;
 
 /**
  * Test that cassandra resources are generated.
@@ -50,28 +43,20 @@ public class StreamsCassandraResourceGeneratorTest {
 
         StreamsCassandraGenerationConfig config = new 
StreamsCassandraGenerationConfig();
 
-        String sourceDirectory = "target/test-classes/streams-schemas";
+        String sourceDirectory = 
"target/test-classes/streams-schema-activitystreams";
 
         config.setSourceDirectory(sourceDirectory);
 
-        config.setTargetDirectory("target/generated-sources/test");
+        config.setTargetDirectory("target/generated-resources/cassandra");
 
         config.setExclusions(Sets.newHashSet("attachments"));
 
         config.setMaxDepth(2);
 
         StreamsCassandraResourceGenerator streamsCassandraResourceGenerator = 
new StreamsCassandraResourceGenerator(config);
-        Thread thread = new Thread(streamsCassandraResourceGenerator);
-        thread.start();
-        try {
-            thread.join();
-        } catch (InterruptedException e) {
-            LOGGER.error("InterruptedException", e);
-        } catch (Exception e) {
-            LOGGER.error("Exception", e);
-        }
+        streamsCassandraResourceGenerator.run();
 
-        File testOutput = new File( "./target/generated-sources/test");
+        File testOutput = config.getTargetDirectory();
 
         assert( testOutput != null );
         assert( testOutput.exists() == true );
@@ -82,43 +67,14 @@ public class StreamsCassandraResourceGeneratorTest {
         Collection<File> outputCollection = Lists.newArrayList(outputIterator);
         assert( outputCollection.size() == 1 );
 
-        Path path = Paths.get("./target/generated-sources/test/types.cql");
+        Path path = 
Paths.get(testOutput.getAbsolutePath()).resolve("types.cql");
+
+        assert( path.toFile().exists() );
 
         String typesCqlBytes = new String(
                 java.nio.file.Files.readAllBytes(path));
 
         assert( StringUtils.countMatches(typesCqlBytes, "CREATE TYPE") == 133 
);
 
-        assert( !typesCqlBytes.contains("IDK"));
-
-
-//        String expectedDirectory = "target/test-classes/expected";
-//        File testExpected = new File( expectedDirectory );
-//
-//        Iterable<File> expectedIterator = 
Files.fileTreeTraverser().breadthFirstTraversal(testExpected)
-//                .filter(cqlFilter);
-//        Collection<File> expectedCollection = 
Lists.newArrayList(expectedIterator);
-//
-//        int fails = 0;
-//
-//        Iterator<File> iterator = expectedCollection.iterator();
-//        while( iterator.hasNext() ) {
-//            File objectExpected = iterator.next();
-//            String expectedEnd = 
dropSourcePathPrefix(objectExpected.getAbsolutePath(),  expectedDirectory);
-//            File objectActual = new File(config.getTargetDirectory() + "/" + 
expectedEnd);
-//            LOGGER.info("Comparing: {} and {}", 
objectExpected.getAbsolutePath(), objectActual.getAbsolutePath());
-//            assert( objectActual.exists());
-//            if( FileUtils.contentEquals(objectActual, objectExpected) == 
true ) {
-//                LOGGER.info("Exact Match!");
-//            } else {
-//                LOGGER.info("No Match!");
-//                fails++;
-//            }
-//        }
-//        if( fails > 0 ) {
-//            LOGGER.info("Fails: {}", fails);
-//            Assert.fail();
-//        }
-
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-plugins/streams-plugin-cassandra/src/test/resources/streams-plugin-cassandra/pom.xml
----------------------------------------------------------------------
diff --git 
a/streams-plugins/streams-plugin-cassandra/src/test/resources/streams-plugin-cassandra/pom.xml
 
b/streams-plugins/streams-plugin-cassandra/src/test/resources/streams-plugin-cassandra/pom.xml
index 064ea52..2a69ec7 100644
--- 
a/streams-plugins/streams-plugin-cassandra/src/test/resources/streams-plugin-cassandra/pom.xml
+++ 
b/streams-plugins/streams-plugin-cassandra/src/test/resources/streams-plugin-cassandra/pom.xml
@@ -18,8 +18,9 @@
         </dependency>
         <dependency>
             <groupId>org.apache.streams</groupId>
-            <artifactId>streams-schemas</artifactId>
+            <artifactId>streams-schema-activitystreams</artifactId>
             <version>${project.version}</version>
+            <type>test-jar</type>
             <scope>test</scope>
         </dependency>
     </dependencies>
@@ -32,19 +33,19 @@
                 <version>0.3-incubating-SNAPSHOT</version>
                 <configuration>
                     <sourcePaths>
-                        
<sourcePath>target/test-classes/streams-schemas/activity.json</sourcePath>
-                        
<sourcePath>target/test-classes/streams-schemas/collection.json</sourcePath>
-                        
<sourcePath>target/test-classes/streams-schemas/media_link.json</sourcePath>
-                        
<sourcePath>target/test-classes/streams-schemas/object.json</sourcePath>
-                        
<sourcePath>target/test-classes/streams-schemas/objectTypes</sourcePath>
-                        
<sourcePath>target/test-classes/streams-schemas/verbs</sourcePath>
+                        
<sourcePath>target/test-classes/streams-schema-activitystreams/activity.json</sourcePath>
+                        
<sourcePath>target/test-classes/streams-schema-activitystreams/collection.json</sourcePath>
+                        
<sourcePath>target/test-classes/streams-schema-activitystreams/media_link.json</sourcePath>
+                        
<sourcePath>target/test-classes/streams-schema-activitystreams/object.json</sourcePath>
+                        
<sourcePath>target/test-classes/streams-schema-activitystreams/objectTypes</sourcePath>
+                        
<sourcePath>target/test-classes/streams-schema-activitystreams/verbs</sourcePath>
                     </sourcePaths>
                     
<targetDirectory>target/generated-resources/test-mojo</targetDirectory>
                 </configuration>
                 <executions>
                     <execution>
                         <goals>
-                            <goal>cassandra</goal>
+                            <goal>generate-resources</goal>
                         </goals>
                     </execution>
                 </executions>
@@ -55,9 +56,9 @@
                 <version>2.10</version>
                 <configuration>
                     <includes>**/*.json</includes>
-                    
<outputDirectory>${project.build.directory}/test-classes/streams-schemas</outputDirectory>
+                    
<outputDirectory>${project.build.directory}/test-classes/streams-schema-activitystreams</outputDirectory>
                     <includeGroupIds>org.apache.streams</includeGroupIds>
-                    <includeArtifactIds>streams-schemas</includeArtifactIds>
+                    
<includeArtifactIds>streams-schema-activitystreams</includeArtifactIds>
                     <includeTypes>jar,test-jar</includeTypes>
                 </configuration>
                 <executions>

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-plugins/streams-plugin-elasticsearch/pom.xml
----------------------------------------------------------------------
diff --git a/streams-plugins/streams-plugin-elasticsearch/pom.xml 
b/streams-plugins/streams-plugin-elasticsearch/pom.xml
index 4f0ed4a..07d7fc1 100644
--- a/streams-plugins/streams-plugin-elasticsearch/pom.xml
+++ b/streams-plugins/streams-plugin-elasticsearch/pom.xml
@@ -55,10 +55,17 @@
         </dependency>
         <dependency>
             <groupId>org.apache.streams</groupId>
-            <artifactId>streams-schemas</artifactId>
+            <artifactId>streams-util</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
+            <groupId>org.apache.streams</groupId>
+            <artifactId>streams-schema-activitystreams</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>com.google.guava</groupId>
             <artifactId>guava</artifactId>
         </dependency>
@@ -231,9 +238,9 @@
                         </goals>
                         <configuration>
                             
<includeGroupIds>org.apache.streams</includeGroupIds>
-                            
<includeArtifactIds>streams-schemas</includeArtifactIds>
+                            
<includeArtifactIds>streams-schema-activitystreams</includeArtifactIds>
                             <includes>**/*.json</includes>
-                            
<outputDirectory>${project.build.directory}/test-classes/streams-schemas</outputDirectory>
+                            
<outputDirectory>${project.build.directory}/test-classes/streams-schema-activitystreams</outputDirectory>
                         </configuration>
                     </execution>
                 </executions>

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-plugins/streams-plugin-elasticsearch/src/main/java/org/apache/streams/plugins/elasticsearch/StreamsElasticsearchGenerationConfig.java
----------------------------------------------------------------------
diff --git 
a/streams-plugins/streams-plugin-elasticsearch/src/main/java/org/apache/streams/plugins/elasticsearch/StreamsElasticsearchGenerationConfig.java
 
b/streams-plugins/streams-plugin-elasticsearch/src/main/java/org/apache/streams/plugins/elasticsearch/StreamsElasticsearchGenerationConfig.java
index ef5b9ef..71bbdf8 100644
--- 
a/streams-plugins/streams-plugin-elasticsearch/src/main/java/org/apache/streams/plugins/elasticsearch/StreamsElasticsearchGenerationConfig.java
+++ 
b/streams-plugins/streams-plugin-elasticsearch/src/main/java/org/apache/streams/plugins/elasticsearch/StreamsElasticsearchGenerationConfig.java
@@ -1,6 +1,6 @@
 package org.apache.streams.plugins.elasticsearch;
 
-import org.apache.streams.schema.GenerationConfig;
+import org.apache.streams.util.schema.GenerationConfig;
 import org.jsonschema2pojo.DefaultGenerationConfig;
 import org.jsonschema2pojo.util.URLUtil;
 

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-plugins/streams-plugin-elasticsearch/src/main/java/org/apache/streams/plugins/elasticsearch/StreamsElasticsearchResourceGenerator.java
----------------------------------------------------------------------
diff --git 
a/streams-plugins/streams-plugin-elasticsearch/src/main/java/org/apache/streams/plugins/elasticsearch/StreamsElasticsearchResourceGenerator.java
 
b/streams-plugins/streams-plugin-elasticsearch/src/main/java/org/apache/streams/plugins/elasticsearch/StreamsElasticsearchResourceGenerator.java
index 0f506ca..4d16f7e 100644
--- 
a/streams-plugins/streams-plugin-elasticsearch/src/main/java/org/apache/streams/plugins/elasticsearch/StreamsElasticsearchResourceGenerator.java
+++ 
b/streams-plugins/streams-plugin-elasticsearch/src/main/java/org/apache/streams/plugins/elasticsearch/StreamsElasticsearchResourceGenerator.java
@@ -1,17 +1,21 @@
 package org.apache.streams.plugins.elasticsearch;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.google.common.base.Joiner;
 import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import com.google.common.base.Strings;
 import com.google.common.collect.Lists;
-import org.apache.streams.schema.FieldType;
-import org.apache.streams.schema.FieldUtil;
-import org.apache.streams.schema.GenerationConfig;
-import org.apache.streams.schema.Schema;
-import org.apache.streams.schema.SchemaStore;
+import org.apache.streams.jackson.StreamsJacksonMapper;
+import org.apache.streams.util.schema.FieldType;
+import org.apache.streams.util.schema.FieldUtil;
+import org.apache.streams.util.schema.GenerationConfig;
+import org.apache.streams.util.schema.Schema;
+import org.apache.streams.util.schema.SchemaStore;
+import org.apache.streams.util.schema.SchemaStoreImpl;
 import org.jsonschema2pojo.util.URLUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -25,10 +29,11 @@ import java.util.List;
 import java.util.Map;
 
 import static com.google.common.base.Preconditions.checkNotNull;
-import static org.apache.streams.schema.FileUtil.dropExtension;
-import static org.apache.streams.schema.FileUtil.dropSourcePathPrefix;
-import static org.apache.streams.schema.FileUtil.resolveRecursive;
-import static org.apache.streams.schema.FileUtil.writeFile;
+import static org.apache.streams.util.schema.FileUtil.dropExtension;
+import static org.apache.streams.util.schema.FileUtil.dropSourcePathPrefix;
+import static org.apache.streams.util.schema.FileUtil.resolveRecursive;
+import static org.apache.streams.util.schema.FileUtil.swapExtension;
+import static org.apache.streams.util.schema.FileUtil.writeFile;
 
 /**
  * Created by sblackmon on 5/3/16.
@@ -37,15 +42,17 @@ public class StreamsElasticsearchResourceGenerator 
implements Runnable {
 
     private final static Logger LOGGER = 
LoggerFactory.getLogger(StreamsElasticsearchResourceGenerator.class);
 
+    ObjectMapper MAPPER = StreamsJacksonMapper.getInstance();
+
     private final static String LS = System.getProperty("line.separator");
 
     private StreamsElasticsearchGenerationConfig config;
 
-    private SchemaStore schemaStore = new SchemaStore();
+    private SchemaStore schemaStore = new SchemaStoreImpl();
 
     private int currentDepth = 0;
 
-    public void main(String[] args) {
+    public static void main(String[] args) {
         StreamsElasticsearchGenerationConfig config = new 
StreamsElasticsearchGenerationConfig();
 
         String sourceDirectory = "target/test-classes/activities";
@@ -59,17 +66,9 @@ public class StreamsElasticsearchResourceGenerator 
implements Runnable {
         config.setSourceDirectory(sourceDirectory);
         config.setTargetDirectory(targetDirectory);
 
-        StreamsElasticsearchResourceGenerator 
StreamsElasticsearchResourceGenerator = new 
StreamsElasticsearchResourceGenerator(config);
-        Thread thread = new Thread(StreamsElasticsearchResourceGenerator);
-        thread.start();
-        try {
-            thread.join();
-        } catch (InterruptedException e) {
-            LOGGER.error("InterruptedException", e);
-        } catch (Exception e) {
-            LOGGER.error("Exception", e);
-        }
-        return;
+        StreamsElasticsearchResourceGenerator 
streamsElasticsearchResourceGenerator = new 
StreamsElasticsearchResourceGenerator(config);
+        streamsElasticsearchResourceGenerator.run();
+
     }
 
     public 
StreamsElasticsearchResourceGenerator(StreamsElasticsearchGenerationConfig 
config) {
@@ -106,7 +105,6 @@ public class StreamsElasticsearchResourceGenerator 
implements Runnable {
 
         LOGGER.info("Identified {} objects:", schemaStore.getSize());
 
-        String outputFile = config.getTargetDirectory() + "/" + "types.cql";
         StringBuilder typesContent = new StringBuilder();
 
         for (Iterator<Schema> schemaIterator = 
schemaStore.getSchemaIterator(); schemaIterator.hasNext(); ) {
@@ -118,6 +116,7 @@ public class StreamsElasticsearchResourceGenerator 
implements Runnable {
                 for (String sourcePath : config.getSourcePaths()) {
                     resourcePath = dropSourcePathPrefix(resourcePath, 
sourcePath);
                 }
+                String outputFile = config.getTargetDirectory() + "/" + 
resourcePath;
 
                 LOGGER.info("Processing {}:", resourcePath);
 
@@ -125,25 +124,33 @@ public class StreamsElasticsearchResourceGenerator 
implements Runnable {
 
                 String resourceContent = generateResource(schema, resourceId);
 
-                typesContent.append(resourceContent);
+                if( !Strings.isNullOrEmpty(resourceContent))
+                    writeFile(outputFile, resourceContent);
 
-                LOGGER.info("Added {}:", resourceId);
+                LOGGER.info("Wrote {}:", outputFile);
             }
         }
 
-        writeFile(outputFile, typesContent.toString());
-
     }
 
     public String generateResource(Schema schema, String resourceId) {
         StringBuilder resourceBuilder = new StringBuilder();
-        resourceBuilder.append("CREATE TYPE ");
-        resourceBuilder.append(resourceId);
-        resourceBuilder.append(" IF NOT EXISTS (");
-        resourceBuilder.append(LS);
-        resourceBuilder = appendRootObject(resourceBuilder, schema, 
resourceId, ' ');
-        resourceBuilder.append(");");
-        resourceBuilder.append(LS);
+
+        ObjectNode rootNode = (ObjectNode) schema.getContent();
+
+        // remove java*
+        // remove description
+        // resolve all $ref
+        // replace format: date with type: date
+        // replace format: date-time with type: date
+        // replace array of primitive with just primitive
+
+        try {
+            String objectString = MAPPER.writeValueAsString(rootNode);
+            resourceBuilder.append(objectString);
+        } catch (JsonProcessingException e) {
+            LOGGER.error("{}: {}", e.getClass().getName(), e);
+        }
         return resourceBuilder.toString();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-plugins/streams-plugin-elasticsearch/src/main/java/org/apache/streams/plugins/elasticsearch/StreamsElasticsearchResourceGeneratorMojo.java
----------------------------------------------------------------------
diff --git 
a/streams-plugins/streams-plugin-elasticsearch/src/main/java/org/apache/streams/plugins/elasticsearch/StreamsElasticsearchResourceGeneratorMojo.java
 
b/streams-plugins/streams-plugin-elasticsearch/src/main/java/org/apache/streams/plugins/elasticsearch/StreamsElasticsearchResourceGeneratorMojo.java
index 6969051..ed280ff 100644
--- 
a/streams-plugins/streams-plugin-elasticsearch/src/main/java/org/apache/streams/plugins/elasticsearch/StreamsElasticsearchResourceGeneratorMojo.java
+++ 
b/streams-plugins/streams-plugin-elasticsearch/src/main/java/org/apache/streams/plugins/elasticsearch/StreamsElasticsearchResourceGeneratorMojo.java
@@ -15,10 +15,10 @@ import org.slf4j.LoggerFactory;
 import java.io.File;
 import java.util.List;
 
-@Mojo(  name = "elasticsearch",
+@Mojo(  name = "generate-resources",
         defaultPhase = LifecyclePhase.GENERATE_RESOURCES
 )
-@Execute(   goal = "elasticsearch",
+@Execute(   goal = "generate-resources",
             phase = LifecyclePhase.GENERATE_RESOURCES
 )
 public class StreamsElasticsearchResourceGeneratorMojo extends AbstractMojo {
@@ -65,29 +65,8 @@ public class StreamsElasticsearchResourceGeneratorMojo 
extends AbstractMojo {
 
         StreamsElasticsearchResourceGenerator 
streamsElasticsearchResourceGenerator = new 
StreamsElasticsearchResourceGenerator(config);
 
-        Thread.UncaughtExceptionHandler h = new 
Thread.UncaughtExceptionHandler() {
-            public void uncaughtException(Thread th, Throwable ex) {
-                LOGGER.error("Exception", ex);
-                mojoFailureException = new MojoFailureException("Exception", 
ex);
-            }
-        };
-        Thread.setDefaultUncaughtExceptionHandler(h);
-        Thread thread = new Thread(streamsElasticsearchResourceGenerator);
-        thread.setUncaughtExceptionHandler(h);
-        try {
-            thread.start();
-            thread.join();
-        } catch (InterruptedException e) {
-            LOGGER.error("InterruptedException", e);
-        } catch (Exception e) {
-            LOGGER.error("Exception", e);
-            mojoFailureException = new MojoFailureException("Exception", e);
-        }
-
-        if( mojoFailureException != null )
-            throw mojoFailureException;
-
-        return;
+        streamsElasticsearchResourceGenerator.run();
+
     }
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-plugins/streams-plugin-elasticsearch/src/site/markdown/index.md
----------------------------------------------------------------------
diff --git 
a/streams-plugins/streams-plugin-elasticsearch/src/site/markdown/index.md 
b/streams-plugins/streams-plugin-elasticsearch/src/site/markdown/index.md
index 9e80a3e..f65433b 100644
--- a/streams-plugins/streams-plugin-elasticsearch/src/site/markdown/index.md
+++ b/streams-plugins/streams-plugin-elasticsearch/src/site/markdown/index.md
@@ -3,17 +3,33 @@ org.apache.streams.plugins:streams-plugin-elasticsearch
 
 streams-plugin-elasticsearch generates resources from json schemas to assist 
with indexing of json data using Elasticsearch.
 
-#### Usage
+### Usage
+
+Output will be placed in target/generated-resources/elasticsearch by default
+
+##### Maven
 
 Run within a module containing a src/main/jsonschema directory
 
     mvn 
org.apache.streams.plugins:streams-plugin-elasticsearch:0.3-incubating-SNAPSHOT:elasticsearch
 
-Output will be placed in target/generated-resources/elasticsearch by default
+[streams-plugin-elasticsearch/pom.xml](streams-plugin-elasticsearch/pom.xml 
"streams-plugin-elasticsearch/pom.xml")
 
-#### Example
+##### SDK
 
-[streams-plugin-elasticsearch/pom.xml](streams-plugin-elasticsearch/pom.xml 
"streams-plugin-elasticsearch/pom.xml")
+Embed within your own java code
+
+    StreamsElasticsearchGenerationConfig config = new 
StreamsElasticsearchGenerationConfig();
+    config.setSourceDirectory("src/main/jsonschema");
+    config.setTargetDirectory("target/generated-resources");
+    StreamsElasticsearchResourceGenerator generator = new 
StreamsElasticsearchResourceGenerator(config);
+    generator.run();
+    
+##### CLI
+ 
+Run from CLI without Maven
+
+    java -jar streams-plugin-elasticsearch-jar-with-dependencies.jar 
StreamsElasticsearchResourceGenerator src/main/jsonschema 
target/generated-resources
 
 #### Documentation
 

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-plugins/streams-plugin-elasticsearch/src/test/java/org/apache/streams/plugins/elasticsearch/test/StreamsElasticsearchResourceGeneratorCLITest.java
----------------------------------------------------------------------
diff --git 
a/streams-plugins/streams-plugin-elasticsearch/src/test/java/org/apache/streams/plugins/elasticsearch/test/StreamsElasticsearchResourceGeneratorCLITest.java
 
b/streams-plugins/streams-plugin-elasticsearch/src/test/java/org/apache/streams/plugins/elasticsearch/test/StreamsElasticsearchResourceGeneratorCLITest.java
new file mode 100644
index 0000000..3805894
--- /dev/null
+++ 
b/streams-plugins/streams-plugin-elasticsearch/src/test/java/org/apache/streams/plugins/elasticsearch/test/StreamsElasticsearchResourceGeneratorCLITest.java
@@ -0,0 +1,39 @@
+package org.apache.streams.plugins.elasticsearch.test;
+
+import com.google.common.collect.Lists;
+import com.google.common.io.Files;
+import 
org.apache.streams.plugins.elasticsearch.StreamsElasticsearchResourceGenerator;
+import org.junit.Test;
+
+import java.io.File;
+import java.util.Collection;
+import java.util.List;
+
+import static 
org.apache.streams.plugins.elasticsearch.test.StreamsElasticsearchResourceGeneratorTest.jsonFilter;
+
+/**
+ * Created by sblackmon on 5/5/16.
+ */
+public class StreamsElasticsearchResourceGeneratorCLITest {
+
+    @Test
+    public void testStreamsElasticsearchResourceGeneratorCLI() throws 
Exception {
+
+        String sourceDirectory = 
"target/test-classes/streams-schema-activitystreams";
+        String targetDirectory = 
"target/generated-resources/elasticsearch-cli";
+
+        List<String> argsList = Lists.newArrayList(sourceDirectory, 
targetDirectory);
+        StreamsElasticsearchResourceGenerator.main(argsList.toArray(new 
String[0]));
+
+        File testOutput = new File(targetDirectory);
+
+        assert( testOutput != null );
+        assert( testOutput.exists() == true );
+        assert( testOutput.isDirectory() == true );
+
+        Iterable<File> outputIterator = 
Files.fileTreeTraverser().breadthFirstTraversal(testOutput)
+                .filter(jsonFilter);
+        Collection<File> outputCollection = Lists.newArrayList(outputIterator);
+        assert( outputCollection.size() == 133 );
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-plugins/streams-plugin-elasticsearch/src/test/java/org/apache/streams/plugins/elasticsearch/test/StreamsElasticsearchResourceGeneratorTest.java
----------------------------------------------------------------------
diff --git 
a/streams-plugins/streams-plugin-elasticsearch/src/test/java/org/apache/streams/plugins/elasticsearch/test/StreamsElasticsearchResourceGeneratorTest.java
 
b/streams-plugins/streams-plugin-elasticsearch/src/test/java/org/apache/streams/plugins/elasticsearch/test/StreamsElasticsearchResourceGeneratorTest.java
index 20bb561..7844442 100644
--- 
a/streams-plugins/streams-plugin-elasticsearch/src/test/java/org/apache/streams/plugins/elasticsearch/test/StreamsElasticsearchResourceGeneratorTest.java
+++ 
b/streams-plugins/streams-plugin-elasticsearch/src/test/java/org/apache/streams/plugins/elasticsearch/test/StreamsElasticsearchResourceGeneratorTest.java
@@ -5,7 +5,6 @@ import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 import com.google.common.io.Files;
 import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang3.StringUtils;
 import 
org.apache.streams.plugins.elasticsearch.StreamsElasticsearchGenerationConfig;
 import 
org.apache.streams.plugins.elasticsearch.StreamsElasticsearchResourceGenerator;
 import org.junit.Assert;
@@ -15,12 +14,10 @@ import org.slf4j.LoggerFactory;
 
 import javax.annotation.Nullable;
 import java.io.File;
-import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.Collection;
 import java.util.Iterator;
 
-import static org.apache.streams.schema.FileUtil.dropSourcePathPrefix;
+import static org.apache.streams.util.schema.FileUtil.dropSourcePathPrefix;
 
 /**
  * Test that Elasticsearch resources are generated.
@@ -29,6 +26,15 @@ public class StreamsElasticsearchResourceGeneratorTest {
 
     private final static Logger LOGGER = 
LoggerFactory.getLogger(StreamsElasticsearchResourceGeneratorTest.class);
 
+    public static final Predicate<File> jsonFilter = new Predicate<File>() {
+        @Override
+        public boolean apply(@Nullable File file) {
+            if( file.getName().endsWith(".json") )
+                return true;
+            else return false;
+        }
+    };
+
     /**
      * Test that Elasticsearch resources are generated
      *
@@ -39,28 +45,21 @@ public class StreamsElasticsearchResourceGeneratorTest {
 
         StreamsElasticsearchGenerationConfig config = new 
StreamsElasticsearchGenerationConfig();
 
-        String sourceDirectory = "target/test-classes/streams-schemas";
+        String sourceDirectory = 
"target/test-classes/streams-schema-activitystreams";
 
         config.setSourceDirectory(sourceDirectory);
 
-        config.setTargetDirectory("target/generated-sources/test");
+        config.setTargetDirectory("target/generated-resources/elasticsearch");
 
         config.setExclusions(Sets.newHashSet("attachments"));
 
         config.setMaxDepth(2);
 
         StreamsElasticsearchResourceGenerator 
streamsElasticsearchResourceGenerator = new 
StreamsElasticsearchResourceGenerator(config);
-        Thread thread = new Thread(streamsElasticsearchResourceGenerator);
-        thread.start();
-        try {
-            thread.join();
-        } catch (InterruptedException e) {
-            LOGGER.error("InterruptedException", e);
-        } catch (Exception e) {
-            LOGGER.error("Exception", e);
-        }
+        streamsElasticsearchResourceGenerator.run();
+
+        File testOutput = config.getTargetDirectory();
 
-        File testOutput = new File( "./target/generated-sources/test");
         Predicate<File> jsonFilter = new Predicate<File>() {
             @Override
             public boolean apply(@Nullable File file) {
@@ -107,33 +106,5 @@ public class StreamsElasticsearchResourceGeneratorTest {
             Assert.fail();
         }
 
-//        String expectedDirectory = "target/test-classes/expected";
-//        File testExpected = new File( expectedDirectory );
-//
-//        Iterable<File> expectedIterator = 
Files.fileTreeTraverser().breadthFirstTraversal(testExpected)
-//                .filter(cqlFilter);
-//        Collection<File> expectedCollection = 
Lists.newArrayList(expectedIterator);
-//
-//        int fails = 0;
-//
-//        Iterator<File> iterator = expectedCollection.iterator();
-//        while( iterator.hasNext() ) {
-//            File objectExpected = iterator.next();
-//            String expectedEnd = 
dropSourcePathPrefix(objectExpected.getAbsolutePath(),  expectedDirectory);
-//            File objectActual = new File(config.getTargetDirectory() + "/" + 
expectedEnd);
-//            LOGGER.info("Comparing: {} and {}", 
objectExpected.getAbsolutePath(), objectActual.getAbsolutePath());
-//            assert( objectActual.exists());
-//            if( FileUtils.contentEquals(objectActual, objectExpected) == 
true ) {
-//                LOGGER.info("Exact Match!");
-//            } else {
-//                LOGGER.info("No Match!");
-//                fails++;
-//            }
-//        }
-//        if( fails > 0 ) {
-//            LOGGER.info("Fails: {}", fails);
-//            Assert.fail();
-//        }
-
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-plugins/streams-plugin-elasticsearch/src/test/resources/streams-plugin-elasticsearch/pom.xml
----------------------------------------------------------------------
diff --git 
a/streams-plugins/streams-plugin-elasticsearch/src/test/resources/streams-plugin-elasticsearch/pom.xml
 
b/streams-plugins/streams-plugin-elasticsearch/src/test/resources/streams-plugin-elasticsearch/pom.xml
index 2aaa037..de74014 100644
--- 
a/streams-plugins/streams-plugin-elasticsearch/src/test/resources/streams-plugin-elasticsearch/pom.xml
+++ 
b/streams-plugins/streams-plugin-elasticsearch/src/test/resources/streams-plugin-elasticsearch/pom.xml
@@ -18,9 +18,10 @@
         </dependency>
         <dependency>
             <groupId>org.apache.streams</groupId>
-            <artifactId>streams-schemas</artifactId>
+            <artifactId>streams-schema-activitystreams</artifactId>
             <version>${project.version}</version>
             <scope>test</scope>
+            <type>test-jar</type>
         </dependency>
     </dependencies>
 
@@ -32,19 +33,19 @@
                 <version>0.3-incubating-SNAPSHOT</version>
                 <configuration>
                     <sourcePaths>
-                        
<sourcePath>target/test-classes/streams-schemas/activity.json</sourcePath>
-                        
<sourcePath>target/test-classes/streams-schemas/collection.json</sourcePath>
-                        
<sourcePath>target/test-classes/streams-schemas/media_link.json</sourcePath>
-                        
<sourcePath>target/test-classes/streams-schemas/object.json</sourcePath>
-                        
<sourcePath>target/test-classes/streams-schemas/objectTypes</sourcePath>
-                        
<sourcePath>target/test-classes/streams-schemas/verbs</sourcePath>
+                        
<sourcePath>target/test-classes/streams-schema-activitystreams/activity.json</sourcePath>
+                        
<sourcePath>target/test-classes/streams-schema-activitystreams/collection.json</sourcePath>
+                        
<sourcePath>target/test-classes/streams-schema-activitystreams/media_link.json</sourcePath>
+                        
<sourcePath>target/test-classes/streams-schema-activitystreams/object.json</sourcePath>
+                        
<sourcePath>target/test-classes/streams-schema-activitystreams/objectTypes</sourcePath>
+                        
<sourcePath>target/test-classes/streams-schema-activitystreams/verbs</sourcePath>
                     </sourcePaths>
-                    
<targetDirectory>target/generated-resources/test-mojo</targetDirectory>
+                    
<targetDirectory>target/generated-resources/elasticsearch-mojo</targetDirectory>
                 </configuration>
                 <executions>
                     <execution>
                         <goals>
-                            <goal>elasticsearch</goal>
+                            <goal>generate-resources</goal>
                         </goals>
                     </execution>
                 </executions>
@@ -55,9 +56,9 @@
                 <version>2.10</version>
                 <configuration>
                     <includes>**/*.json</includes>
-                    
<outputDirectory>${project.build.directory}/test-classes/streams-schemas</outputDirectory>
+                    
<outputDirectory>${project.build.directory}/test-classes/streams-schema-activitystreams</outputDirectory>
                     <includeGroupIds>org.apache.streams</includeGroupIds>
-                    <includeArtifactIds>streams-schemas</includeArtifactIds>
+                    
<includeArtifactIds>streams-schema-activitystreams</includeArtifactIds>
                     <includeTypes>jar,test-jar</includeTypes>
                 </configuration>
                 <executions>

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/d9674f7c/streams-plugins/streams-plugin-hbase/pom.xml
----------------------------------------------------------------------
diff --git a/streams-plugins/streams-plugin-hbase/pom.xml 
b/streams-plugins/streams-plugin-hbase/pom.xml
index 94a0115..b29bd38 100644
--- a/streams-plugins/streams-plugin-hbase/pom.xml
+++ b/streams-plugins/streams-plugin-hbase/pom.xml
@@ -54,10 +54,17 @@
         </dependency>
         <dependency>
             <groupId>org.apache.streams</groupId>
-            <artifactId>streams-schemas</artifactId>
+            <artifactId>streams-util</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
+            <groupId>org.apache.streams</groupId>
+            <artifactId>streams-schema-activitystreams</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>com.google.guava</groupId>
             <artifactId>guava</artifactId>
         </dependency>
@@ -230,9 +237,9 @@
                         </goals>
                         <configuration>
                             
<includeGroupIds>org.apache.streams</includeGroupIds>
-                            
<includeArtifactIds>streams-schemas</includeArtifactIds>
+                            
<includeArtifactIds>streams-schema-activitystreams</includeArtifactIds>
                             <includes>**/*.json</includes>
-                            
<outputDirectory>${project.build.directory}/test-classes/streams-schemas</outputDirectory>
+                            
<outputDirectory>${project.build.directory}/test-classes/streams-schema-activitystreams</outputDirectory>
                         </configuration>
                     </execution>
                 </executions>


Reply via email to