Squashed commit of STREAMS-443: use org.apache.streams.plugins:streams-plugin-pojo instead of org.jsonschema2pojo
commit a4b762d846d6fccdd54854b55a928b9dc0787d49 Author: Steve Blackmon @steveblackmon <sblack...@apache.org> Date: Sat Nov 5 16:25:11 2016 -0500 STREAMS-443: re-enable streams-runtime-dropwizard commit 137cbef42caeb49ddfbb006dce5089e203fecf4a Author: Steve Blackmon @steveblackmon <sblack...@apache.org> Date: Sat Nov 5 15:09:34 2016 -0500 STREAMS-443: use org.apache.streams.plugins:streams-plugin-pojo instead of org.jsonschema2pojo Adapt to loss of Actor object using new plugin Actor should not really be a distinct class from ActivityObject, because it doesnât have any differentiated fields or validation rules. A few tests needed a bit more attention - all still pass and apply the original material criteria. commit dc109b8d7432e406c288fc95228915153453453e Author: Steve Blackmon @steveblackmon <sblack...@apache.org> Date: Sat Nov 5 15:01:57 2016 -0500 STREAMS-443: changes to project poms and json schemas commit 77d4990ec098226f15d73b1bc5018f7808265346 Author: Steve Blackmon @steveblackmon <sblack...@apache.org> Date: Sat Nov 5 15:00:25 2016 -0500 STREAMS-443: streams-plugin-pojo working as expected commit 09bfe75feefe4dd966357270e2dec2c233fc3437 Author: Steve Blackmon @steveblackmon <sblack...@apache.org> Date: Sat Nov 5 15:00:07 2016 -0500 STREAMS-443: confirm test data matches official jsonschemas commit f61b768bd468a13b7b32a318a1995c116ae7da52 Author: Steve Blackmon @steveblackmon <sblack...@apache.org> Date: Sat Nov 5 14:55:51 2016 -0500 STREAMS-443: configure underlying plugin commit f29e4c1d22c9dedb66ee448de4a3fc8dad9ee985 Author: Steve Blackmon @steveblackmon <sblack...@apache.org> Date: Sat Nov 5 14:54:24 2016 -0500 remove full URL from schema id they are unnecessary and complicate testing SchemaStore and code gen plugins commit 3c8254b7ec8277ced0b27b0ede361578bfbfaefd Author: Steve Blackmon @steveblackmon <sblack...@apache.org> Date: Sat Nov 5 14:52:47 2016 -0500 STREAMS-443: also remove unused AS 1.0 XML schemas commit 7269dffd7eb8a269b60d816f2fc4e157ae013bb5 Author: Steve Blackmon @steveblackmon <sblack...@apache.org> Date: Sat Nov 5 14:52:23 2016 -0500 STREAMS-443: remove duplicate json schemas from streams-pojo remove now duplicated json schemas from streams-pojo Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/4f100f3a Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/4f100f3a Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/4f100f3a Branch: refs/heads/master Commit: 4f100f3a2e97ddc512a9d745b999625602ad274e Parents: 3489634 Author: Steve Blackmon @steveblackmon <sblack...@apache.org> Authored: Fri Nov 11 12:37:56 2016 -0600 Committer: Steve Blackmon @steveblackmon <sblack...@apache.org> Committed: Fri Nov 11 12:37:56 2016 -0600 ---------------------------------------------------------------------- pom.xml | 2 +- streams-components/streams-converters/pom.xml | 68 +++++---- .../converter/ActivityObjectConverterUtil.java | 72 ++++++---- ...ActivityConverterProcessorConfiguration.json | 8 +- streams-components/streams-http/pom.xml | 69 ++++----- streams-config/pom.xml | 69 +++++---- .../streams-persist-kinesis/pom.xml | 43 +++--- .../streams-persist-s3/pom.xml | 46 +++--- .../streams-persist-elasticsearch/pom.xml | 62 +++------ .../test/ElasticsearchPersistUpdaterIT.java | 4 +- .../streams-persist-filebuffer/pom.xml | 43 +++--- streams-contrib/streams-persist-graph/pom.xml | 50 ++++--- .../streams/graph/GraphHttpPersistWriter.java | 3 +- .../graph/test/TestCypherQueryGraphHelper.java | 13 +- streams-contrib/streams-persist-hbase/pom.xml | 43 +++--- streams-contrib/streams-persist-hdfs/pom.xml | 51 ++++--- streams-contrib/streams-persist-kafka/pom.xml | 43 +++--- streams-contrib/streams-persist-mongo/pom.xml | 43 +++--- .../streams-processor-peoplepattern/pom.xml | 7 +- .../peoplepattern/AccountTypeProcessor.java | 6 +- .../peoplepattern/DemographicsProcessor.java | 6 +- streams-contrib/streams-processor-urls/pom.xml | 57 +++----- .../streams-provider-facebook/pom.xml | 69 +++------ .../serializer/FacebookActivityUtil.java | 17 ++- .../FacebookStreamsPostSerializer.java | 6 +- .../google-gmail/pom.xml | 47 +++---- .../GMailMessageActivitySerializer.java | 3 +- .../google-gplus/pom.xml | 47 +++---- .../serializer/util/GooglePlusActivityUtil.java | 13 +- .../google/gplus/GooglePlusPersonSerDeIT.java | 4 +- .../processor/GooglePlusActivitySerDeIT.java | 4 +- .../streams-provider-instagram/pom.xml | 48 +++---- .../serializer/util/InstagramActivityUtil.java | 9 +- .../streams-provider-moreover/pom.xml | 74 ++++------ .../apache/streams/moreover/MoreoverUtils.java | 5 +- streams-contrib/streams-provider-rss/pom.xml | 47 +++---- .../serializer/SyndEntryActivitySerializer.java | 7 +- .../rss/test/SyndEntryActivitySerializerIT.java | 4 +- .../streams-provider-sysomos/pom.xml | 77 +++++----- .../SysomosBeatActivityConverter.java | 5 +- .../streams-provider-twitter/pom.xml | 47 +++---- ...terJsonUserstreameventActivityConverter.java | 5 +- .../converter/util/TwitterActivityUtil.java | 17 ++- .../TwitterActivityObjectsConvertersTest.java | 13 +- .../streams-provider-youtube/pom.xml | 41 ++++-- .../youtube/serializer/YoutubeActivityUtil.java | 11 +- .../serializer/YoutubeVideoSerDeTest.java | 3 +- streams-monitoring/pom.xml | 50 +++++-- .../jackson/MemoryUsageDeserializerTest.java | 2 +- streams-plugins/pom.xml | 1 + .../streams-plugin-cassandra/pom.xml | 7 +- .../streams-plugin-elasticsearch/pom.xml | 7 +- streams-plugins/streams-plugin-hbase/pom.xml | 7 +- streams-plugins/streams-plugin-hive/pom.xml | 7 +- streams-plugins/streams-plugin-pig/pom.xml | 7 +- streams-plugins/streams-plugin-pojo/pom.xml | 31 +---- .../plugins/StreamsPojoGenerationConfig.java | 35 +++++ .../test/StreamsPojoSourceGeneratorTest.java | 1 - .../test/resources/streams-plugin-pojo/pom.xml | 12 +- streams-plugins/streams-plugin-scala/pom.xml | 11 +- .../test/StreamsScalaSourceGeneratorTest.java | 36 ++--- streams-pojo/pom.xml | 139 ++++++++++--------- streams-pojo/src/main/jsonschema/activity.json | 119 ---------------- .../src/main/jsonschema/collection.json | 48 ------- .../src/main/jsonschema/media_link.json | 35 ----- streams-pojo/src/main/jsonschema/object.json | 100 ------------- .../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 | 43 ------ .../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 | 44 ------ .../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 ---- streams-pojo/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 ---- streams-pojo/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 ---- streams-pojo/src/main/jsonschema/verbs/tag.json | 24 ---- .../src/main/jsonschema/verbs/terminate.json | 24 ---- streams-pojo/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 ----- streams-pojo/src/main/jsonschema/verbs/use.json | 24 ---- .../src/main/jsonschema/verbs/watch.json | 24 ---- streams-pojo/src/main/jsonschema/verbs/win.json | 24 ---- streams-pojo/src/main/xmlschema/activity.xsd | 94 ------------- .../streams-runtime-dropwizard/pom.xml | 78 ++++++----- streams-runtimes/streams-runtime-local/pom.xml | 50 +++---- .../jsonschema/LocalRuntimeConfiguration.json | 2 +- .../streams-schema-activitystreams/pom.xml | 28 ++++ .../src/main/jsonschema/activity.json | 2 +- .../src/main/jsonschema/collection.json | 2 +- .../src/main/jsonschema/media_link.json | 2 +- .../src/main/jsonschema/object.json | 3 +- .../src/main/jsonschema/objectTypes/alert.json | 2 +- .../jsonschema/objectTypes/application.json | 2 +- .../main/jsonschema/objectTypes/article.json | 2 +- .../src/main/jsonschema/objectTypes/audio.json | 2 +- .../src/main/jsonschema/objectTypes/badge.json | 2 +- .../src/main/jsonschema/objectTypes/binary.json | 2 +- .../main/jsonschema/objectTypes/bookmark.json | 2 +- .../main/jsonschema/objectTypes/comment.json | 2 +- .../src/main/jsonschema/objectTypes/device.json | 2 +- .../src/main/jsonschema/objectTypes/event.json | 2 +- .../src/main/jsonschema/objectTypes/file.json | 2 +- .../src/main/jsonschema/objectTypes/folder.json | 2 +- .../src/main/jsonschema/objectTypes/game.json | 2 +- .../src/main/jsonschema/objectTypes/group.json | 2 +- .../src/main/jsonschema/objectTypes/image.json | 2 +- .../src/main/jsonschema/objectTypes/issue.json | 2 +- .../src/main/jsonschema/objectTypes/job.json | 2 +- .../src/main/jsonschema/objectTypes/list.json | 2 +- .../src/main/jsonschema/objectTypes/note.json | 2 +- .../src/main/jsonschema/objectTypes/offer.json | 2 +- .../jsonschema/objectTypes/organization.json | 2 +- .../src/main/jsonschema/objectTypes/page.json | 2 +- .../main/jsonschema/objectTypes/permission.json | 2 +- .../src/main/jsonschema/objectTypes/person.json | 2 +- .../jsonschema/objectTypes/photo-album.json | 2 +- .../src/main/jsonschema/objectTypes/photo.json | 2 +- .../src/main/jsonschema/objectTypes/place.json | 2 +- .../main/jsonschema/objectTypes/playlist.json | 2 +- .../main/jsonschema/objectTypes/process.json | 2 +- .../main/jsonschema/objectTypes/product.json | 2 +- .../main/jsonschema/objectTypes/property.json | 2 +- .../main/jsonschema/objectTypes/question.json | 2 +- .../src/main/jsonschema/objectTypes/review.json | 2 +- .../src/main/jsonschema/objectTypes/role.json | 2 +- .../main/jsonschema/objectTypes/service.json | 2 +- .../src/main/jsonschema/objectTypes/song.json | 2 +- .../src/main/jsonschema/objectTypes/status.json | 2 +- .../src/main/jsonschema/objectTypes/task.json | 2 +- .../src/main/jsonschema/objectTypes/team.json | 2 +- .../src/main/jsonschema/objectTypes/video.json | 2 +- .../src/main/jsonschema/verbs/accept.json | 2 +- .../src/main/jsonschema/verbs/access.json | 2 +- .../src/main/jsonschema/verbs/acknowledge.json | 2 +- .../src/main/jsonschema/verbs/add.json | 2 +- .../src/main/jsonschema/verbs/agree.json | 2 +- .../src/main/jsonschema/verbs/append.json | 2 +- .../src/main/jsonschema/verbs/approve.json | 2 +- .../src/main/jsonschema/verbs/archive.json | 2 +- .../src/main/jsonschema/verbs/assign.json | 2 +- .../src/main/jsonschema/verbs/at.json | 2 +- .../src/main/jsonschema/verbs/attach.json | 2 +- .../src/main/jsonschema/verbs/attend.json | 2 +- .../src/main/jsonschema/verbs/author.json | 2 +- .../src/main/jsonschema/verbs/authorize.json | 2 +- .../src/main/jsonschema/verbs/borrow.json | 2 +- .../src/main/jsonschema/verbs/build.json | 2 +- .../src/main/jsonschema/verbs/cancel.json | 2 +- .../src/main/jsonschema/verbs/checkin.json | 2 +- .../src/main/jsonschema/verbs/close.json | 2 +- .../src/main/jsonschema/verbs/complete.json | 2 +- .../src/main/jsonschema/verbs/confirm.json | 2 +- .../src/main/jsonschema/verbs/consume.json | 2 +- .../src/main/jsonschema/verbs/create.json | 2 +- .../src/main/jsonschema/verbs/delete.json | 2 +- .../src/main/jsonschema/verbs/deliver.json | 2 +- .../src/main/jsonschema/verbs/deny.json | 2 +- .../src/main/jsonschema/verbs/disagree.json | 2 +- .../src/main/jsonschema/verbs/dislike.json | 2 +- .../src/main/jsonschema/verbs/experience.json | 2 +- .../src/main/jsonschema/verbs/favorite.json | 2 +- .../src/main/jsonschema/verbs/find.json | 2 +- .../jsonschema/verbs/flag-as-inappropriate.json | 2 +- .../src/main/jsonschema/verbs/follow.json | 2 +- .../src/main/jsonschema/verbs/give.json | 2 +- .../src/main/jsonschema/verbs/host.json | 2 +- .../src/main/jsonschema/verbs/ignore.json | 2 +- .../src/main/jsonschema/verbs/insert.json | 2 +- .../src/main/jsonschema/verbs/install.json | 2 +- .../src/main/jsonschema/verbs/interact.json | 2 +- .../src/main/jsonschema/verbs/invite.json | 2 +- .../src/main/jsonschema/verbs/join.json | 2 +- .../src/main/jsonschema/verbs/leave.json | 2 +- .../src/main/jsonschema/verbs/like.json | 2 +- .../src/main/jsonschema/verbs/listen.json | 2 +- .../src/main/jsonschema/verbs/lose.json | 2 +- .../src/main/jsonschema/verbs/make-friend.json | 2 +- .../src/main/jsonschema/verbs/open.json | 2 +- .../src/main/jsonschema/verbs/play.json | 2 +- .../src/main/jsonschema/verbs/post.json | 2 +- .../src/main/jsonschema/verbs/present.json | 2 +- .../src/main/jsonschema/verbs/purchase.json | 2 +- .../src/main/jsonschema/verbs/qualify.json | 2 +- .../src/main/jsonschema/verbs/read.json | 2 +- .../src/main/jsonschema/verbs/receive.json | 2 +- .../src/main/jsonschema/verbs/reject.json | 2 +- .../main/jsonschema/verbs/remove-friend.json | 2 +- .../src/main/jsonschema/verbs/remove.json | 2 +- .../src/main/jsonschema/verbs/replace.json | 2 +- .../main/jsonschema/verbs/request-friend.json | 2 +- .../src/main/jsonschema/verbs/request.json | 2 +- .../src/main/jsonschema/verbs/resolve.json | 2 +- .../src/main/jsonschema/verbs/retract.json | 2 +- .../src/main/jsonschema/verbs/return.json | 2 +- .../src/main/jsonschema/verbs/rsvp-maybe.json | 2 +- .../src/main/jsonschema/verbs/rsvp-no.json | 2 +- .../src/main/jsonschema/verbs/rsvp-yes.json | 2 +- .../src/main/jsonschema/verbs/satisfy.json | 2 +- .../src/main/jsonschema/verbs/save.json | 2 +- .../src/main/jsonschema/verbs/schedule.json | 2 +- .../src/main/jsonschema/verbs/search.json | 2 +- .../src/main/jsonschema/verbs/sell.json | 2 +- .../src/main/jsonschema/verbs/send.json | 2 +- .../src/main/jsonschema/verbs/share.json | 2 +- .../src/main/jsonschema/verbs/sponsor.json | 2 +- .../src/main/jsonschema/verbs/start.json | 2 +- .../main/jsonschema/verbs/stop-following.json | 2 +- .../src/main/jsonschema/verbs/submit.json | 2 +- .../src/main/jsonschema/verbs/tag.json | 2 +- .../src/main/jsonschema/verbs/terminate.json | 2 +- .../src/main/jsonschema/verbs/tie.json | 2 +- .../src/main/jsonschema/verbs/unfavorite.json | 2 +- .../src/main/jsonschema/verbs/unlike.json | 2 +- .../src/main/jsonschema/verbs/unsatisfy.json | 2 +- .../src/main/jsonschema/verbs/unsave.json | 2 +- .../src/main/jsonschema/verbs/unshare.json | 2 +- .../src/main/jsonschema/verbs/update.json | 2 +- .../src/main/jsonschema/verbs/use.json | 2 +- .../src/main/jsonschema/verbs/watch.json | 2 +- .../src/main/jsonschema/verbs/win.json | 2 +- .../test/SchemaValidationTest.java | 86 ++++++++++++ streams-util/pom.xml | 26 ++-- .../util/schema/test/SchemaStoreTest.java | 11 +- streams-verbs/pom.xml | 50 +++---- .../ObjectCombinationSpecificOrderingTest.java | 4 +- .../verbs/VerbDefinitionTemplateTest.java | 3 +- 339 files changed, 1189 insertions(+), 4687 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4f100f3a/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index db76eb7..5e7ca2f 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ <groupId>org.apache.streams</groupId> <artifactId>streams-project</artifactId> - <version>0.5-incubating-SNAPSHOT</version> + <version>0.5-incubating-SNAPSHOT</version> <name>Apache Streams Project</name> <description>Apache Streams Project</description> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4f100f3a/streams-components/streams-converters/pom.xml ---------------------------------------------------------------------- diff --git a/streams-components/streams-converters/pom.xml b/streams-components/streams-converters/pom.xml index c68cfae..e9e212e 100644 --- a/streams-components/streams-converters/pom.xml +++ b/streams-components/streams-converters/pom.xml @@ -39,6 +39,11 @@ </dependency> <dependency> <groupId>org.apache.streams</groupId> + <artifactId>streams-pojo</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.streams</groupId> <artifactId>streams-pojo-extensions</artifactId> <version>${project.version}</version> </dependency> @@ -89,62 +94,51 @@ </testResource> </testResources> <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.8</version> + <groupId>org.apache.streams.plugins</groupId> + <artifactId>streams-plugin-pojo</artifactId> + <version>${project.version}</version> + <configuration> + <sourcePaths> + <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> + </sourcePaths> + <targetDirectory>${project.basedir}/target/generated-sources/pojo</targetDirectory> + <targetPackage>org.apache.streams.converter</targetPackage> + </configuration> <executions> <execution> - <id>add-source</id> - <phase>generate-sources</phase> <goals> - <goal>add-source</goal> + <goal>generate-sources</goal> </goals> - <configuration> - <sources> - <source>target/generated-sources/jsonschema2pojo</source> - </sources> - </configuration> </execution> + </executions> + <dependencies> + <dependency> + <groupId>org.apache.streams</groupId> + <artifactId>streams-pojo</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <executions> <execution> - <id>add-source-jaxb2</id> + <id>add-source</id> <phase>generate-sources</phase> <goals> <goal>add-source</goal> </goals> <configuration> <sources> - <source>target/generated-sources/jaxb2</source> + <source>target/generated-sources/pojo</source> </sources> </configuration> </execution> </executions> </plugin> <plugin> - <groupId>org.jsonschema2pojo</groupId> - <artifactId>jsonschema2pojo-maven-plugin</artifactId> - <configuration> - <addCompileSourceRoot>true</addCompileSourceRoot> - <generateBuilders>true</generateBuilders> - <sourcePaths> - <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> - </sourcePaths> - <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> - <targetPackage>org.apache.streams.converter</targetPackage> - <useLongIntegers>true</useLongIntegers> - <useJodaDates>true</useJodaDates> - <includeJsr303Annotations>true</includeJsr303Annotations> - </configuration> - <executions> - <execution> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> <groupId>org.reflections</groupId> <artifactId>reflections-maven</artifactId> <executions> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4f100f3a/streams-components/streams-converters/src/main/java/org/apache/streams/converter/ActivityObjectConverterUtil.java ---------------------------------------------------------------------- diff --git a/streams-components/streams-converters/src/main/java/org/apache/streams/converter/ActivityObjectConverterUtil.java b/streams-components/streams-converters/src/main/java/org/apache/streams/converter/ActivityObjectConverterUtil.java index 629d82a..8085780 100644 --- a/streams-components/streams-converters/src/main/java/org/apache/streams/converter/ActivityObjectConverterUtil.java +++ b/streams-components/streams-converters/src/main/java/org/apache/streams/converter/ActivityObjectConverterUtil.java @@ -36,6 +36,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Collections; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; @@ -62,11 +63,11 @@ public class ActivityObjectConverterUtil { private static final ActivityObjectConverterUtil INSTANCE = new ActivityObjectConverterUtil(); - public static ActivityObjectConverterUtil getInstance(){ + public static ActivityObjectConverterUtil getInstance() { return INSTANCE; } - public static ActivityObjectConverterUtil getInstance(ActivityObjectConverterProcessorConfiguration configuration){ + public static ActivityObjectConverterUtil getInstance(ActivityObjectConverterProcessorConfiguration configuration) { return new ActivityObjectConverterUtil(configuration); } @@ -91,11 +92,9 @@ public class ActivityObjectConverterUtil { public synchronized ActivityObject convert(Object document) { - ActivityObject result = null; - List<Class> detectedClasses = detectClasses(document); - if( detectedClasses.size() == 0 ) { + if (detectedClasses.size() == 0) { LOGGER.warn("Unable to classify"); return null; } else { @@ -106,31 +105,29 @@ public class ActivityObjectConverterUtil { // use TypeUtil to switch the document to that type Map<Class, Object> typedDocs = convertToDetectedClasses(detectedClasses, document); - if( typedDocs.size() == 0 ) { + if (typedDocs.size() == 0) { LOGGER.warn("Unable to convert to any detected Class"); return null; - } - else { + } else { LOGGER.debug("Document has " + typedDocs.size() + " representations: " + typedDocs.toString()); } + Map<Class, ActivityObject> convertedDocs = new HashMap<>(); + // for each specified / discovered converter - for( ActivityObjectConverter converter : converters ) { + for (ActivityObjectConverter converter : converters) { - Object typedDoc = typedDocs.get(converter.requiredClass()); + Class requiredClass = converter.requiredClass(); - ActivityObject activityObject = applyConverter(converter, typedDoc); + Object typedDoc = typedDocs.get(requiredClass); - // prefer the most specific ActivityObject sub-class returned by all converters - if( activityObject != null ) { - if (result == null) - result = activityObject; - else if (isAncestor(activityObject.getClass(), result.getClass())) - result = activityObject; - } + ActivityObject activityObject = applyConverter(converter, typedDoc); + convertedDocs.put(requiredClass, activityObject); } + ActivityObject result = deepestDescendant(convertedDocs); + return result; } @@ -138,12 +135,12 @@ public class ActivityObjectConverterUtil { ActivityObject activityObject = null; // if the document can be typed as the required class - if( typedDoc != null ) { + if (typedDoc != null) { // let the converter create activities if it can try { activityObject = convertToActivityObject(converter, typedDoc); - } catch( Exception e ) { + } catch (Exception e) { LOGGER.debug("convertToActivity caught exception " + e.getMessage()); } @@ -170,12 +167,12 @@ public class ActivityObjectConverterUtil { // spark 1.5.0 uses guava 14 so for the moment this is the workaround // Set<Class> detectedClasses = new ConcurrentHashSet(); Set<Class> detectedClasses = Collections.newSetFromMap(new ConcurrentHashMap<Class, Boolean>()); - for( DocumentClassifier classifier : classifiers ) { + for (DocumentClassifier classifier : classifiers) { try { List<Class> detected = classifier.detectClasses(document); if (detected != null && detected.size() > 0) detectedClasses.addAll(detected); - } catch( Exception e) { + } catch (Exception e) { LOGGER.warn("{} failed in method detectClasses - ()", classifier.getClass().getCanonicalName(), e); } } @@ -186,7 +183,7 @@ public class ActivityObjectConverterUtil { private Map<Class, Object> convertToDetectedClasses(List<Class> datumClasses, Object document) { Map<Class, Object> convertedDocuments = Maps.newHashMap(); - for( Class detectedClass : datumClasses ) { + for (Class detectedClass : datumClasses) { Object typedDoc; if (detectedClass.isInstance(document)) @@ -194,7 +191,7 @@ public class ActivityObjectConverterUtil { else typedDoc = TypeConverterUtil.getInstance().convert(document, detectedClass); - if( typedDoc != null ) + if (typedDoc != null) convertedDocuments.put(detectedClass, typedDoc); } @@ -205,7 +202,7 @@ public class ActivityObjectConverterUtil { Reflections reflections = new Reflections(new ConfigurationBuilder() .setUrls(ClasspathHelper.forPackage("org.apache.streams")) .setScanners(new SubTypesScanner())); - if ( classifiers.size() == 0) { + if (classifiers.size() == 0) { Set<Class<? extends DocumentClassifier>> classifierClasses = reflections.getSubTypesOf(DocumentClassifier.class); for (Class classifierClass : classifierClasses) { try { @@ -216,7 +213,7 @@ public class ActivityObjectConverterUtil { } } Preconditions.checkArgument(classifiers.size() > 0); - if ( converters.size() == 0) { + if (converters.size() == 0) { Set<Class<? extends ActivityObjectConverter>> converterClasses = reflections.getSubTypesOf(ActivityObjectConverter.class); for (Class converterClass : converterClasses) { try { @@ -230,10 +227,29 @@ public class ActivityObjectConverterUtil { } private boolean isAncestor(Class possibleDescendant, Class possibleAncestor) { - if( possibleDescendant.equals(Object.class)) + if (possibleDescendant.equals(Object.class)) return false; - if( possibleDescendant.getSuperclass().equals(possibleAncestor)) + if (possibleDescendant.getSuperclass().equals(possibleAncestor)) return true; else return isAncestor(possibleDescendant.getSuperclass(), possibleAncestor); } + + // prefer the most specific ActivityObject sub-class returned by all converters + private ActivityObject deepestDescendant(Map<Class, ActivityObject> map) { + + ActivityObject result = null; + + for( Map.Entry<Class, ActivityObject> entry : map.entrySet()) { + if( entry.getKey() != null ) { + if (result == null) + result = entry.getValue(); + else if (isAncestor(entry.getKey(), result.getClass())) + result = entry.getValue(); + } + } + + return result; + } + + } http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4f100f3a/streams-components/streams-converters/src/main/jsonschema/org/apache/streams/converter/ActivityConverterProcessorConfiguration.json ---------------------------------------------------------------------- diff --git a/streams-components/streams-converters/src/main/jsonschema/org/apache/streams/converter/ActivityConverterProcessorConfiguration.json b/streams-components/streams-converters/src/main/jsonschema/org/apache/streams/converter/ActivityConverterProcessorConfiguration.json index 93ac094..f535b5a 100644 --- a/streams-components/streams-converters/src/main/jsonschema/org/apache/streams/converter/ActivityConverterProcessorConfiguration.json +++ b/streams-components/streams-converters/src/main/jsonschema/org/apache/streams/converter/ActivityConverterProcessorConfiguration.json @@ -11,15 +11,15 @@ "classifiers": { "type": "array", "items": { - "type": "object", - "javaType": "org.apache.streams.data.DocumentClassifier" + "javaType": "org.apache.streams.data.DocumentClassifier", + "type": "object" } }, "converters": { "type": "array", "items": { - "type": "object", - "javaType": "org.apache.streams.data.ActivityConverter" + "javaType": "org.apache.streams.data.ActivityConverter", + "type": "object" } } } http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4f100f3a/streams-components/streams-http/pom.xml ---------------------------------------------------------------------- diff --git a/streams-components/streams-http/pom.xml b/streams-components/streams-http/pom.xml index 659530b..9f99ead 100644 --- a/streams-components/streams-http/pom.xml +++ b/streams-components/streams-http/pom.xml @@ -35,13 +35,6 @@ <dependencies> <dependency> - <groupId>org.jsonschema2pojo</groupId> - <artifactId>jsonschema2pojo-core</artifactId> - <type>jar</type> - <scope>compile</scope> - </dependency> - - <dependency> <groupId>org.apache.streams</groupId> <artifactId>streams-config</artifactId> </dependency> @@ -126,59 +119,49 @@ </testResources> <plugins> <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.8</version> + <groupId>org.apache.streams.plugins</groupId> + <artifactId>streams-plugin-pojo</artifactId> + <version>${project.version}</version> + <configuration> + <sourcePaths> + <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> + </sourcePaths> + <targetDirectory>${project.basedir}/target/generated-sources/pojo</targetDirectory> + <targetPackage>org.apache.streams.http</targetPackage> + </configuration> <executions> <execution> - <id>add-source</id> - <phase>generate-sources</phase> <goals> - <goal>add-source</goal> + <goal>generate-sources</goal> </goals> - <configuration> - <sources> - <source>target/generated-sources/jsonschema2pojo</source> - </sources> - </configuration> </execution> + </executions> + <dependencies> + <dependency> + <groupId>org.apache.streams</groupId> + <artifactId>streams-converters</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <executions> <execution> - <id>add-source-jaxb2</id> + <id>add-source</id> <phase>generate-sources</phase> <goals> <goal>add-source</goal> </goals> <configuration> <sources> - <source>target/generated-sources/jaxb2</source> + <source>target/generated-sources/pojo</source> </sources> </configuration> </execution> </executions> </plugin> - <plugin> - <groupId>org.jsonschema2pojo</groupId> - <artifactId>jsonschema2pojo-maven-plugin</artifactId> - <configuration> - <addCompileSourceRoot>true</addCompileSourceRoot> - <generateBuilders>true</generateBuilders> - <sourcePaths> - <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> - </sourcePaths> - <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> - <targetPackage>org.apache.streams.http</targetPackage> - <useLongIntegers>true</useLongIntegers> - <useJodaDates>true</useJodaDates> - <includeJsr303Annotations>true</includeJsr303Annotations> - </configuration> - <executions> - <execution> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> </plugins> </build> </project> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4f100f3a/streams-config/pom.xml ---------------------------------------------------------------------- diff --git a/streams-config/pom.xml b/streams-config/pom.xml index 2069489..fb5b3e6 100644 --- a/streams-config/pom.xml +++ b/streams-config/pom.xml @@ -46,11 +46,11 @@ </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-annotations</artifactId> + <artifactId>jackson-databind</artifactId> </dependency> <dependency> - <groupId>org.jsonschema2pojo</groupId> - <artifactId>jsonschema2pojo-core</artifactId> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-annotations</artifactId> </dependency> <dependency> <groupId>com.fasterxml.jackson.dataformat</groupId> @@ -61,6 +61,25 @@ <artifactId>commons-io</artifactId> </dependency> <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + </dependency> + <dependency> + <groupId>commons-validator</groupId> + <artifactId>commons-validator</artifactId> + <exclusions> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>javax.validation</groupId> + <artifactId>validation-api</artifactId> + <version>1.1.0.Final</version> + </dependency> + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> </dependency> @@ -100,42 +119,40 @@ </testResources> <plugins> <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> + <groupId>org.apache.streams.plugins</groupId> + <artifactId>streams-plugin-pojo</artifactId> + <version>${project.version}</version> + <configuration> + <sourcePaths> + <sourcePath>${basedir}/src/main/jsonschema</sourcePath> + </sourcePaths> + <targetDirectory>${basedir}/target/generated-sources/pojo</targetDirectory> + <targetPackage>org.apache.streams.config</targetPackage> + </configuration> <executions> <execution> - <id>add-source</id> <phase>generate-sources</phase> <goals> - <goal>add-source</goal> + <goal>generate-sources</goal> </goals> - <configuration> - <sources> - <source>${project.basedir}/target/generated-sources/jsonschema2pojo</source> - </sources> - </configuration> </execution> </executions> </plugin> <plugin> - <groupId>org.jsonschema2pojo</groupId> - <artifactId>jsonschema2pojo-maven-plugin</artifactId> - <configuration> - <addCompileSourceRoot>true</addCompileSourceRoot> - <generateBuilders>true</generateBuilders> - <sourcePaths> - <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> - </sourcePaths> - <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> - <targetPackage>org.apache.streams.config</targetPackage> - <useLongIntegers>true</useLongIntegers> - <useJodaDates>true</useJodaDates> - </configuration> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> <executions> <execution> + <id>add-source</id> + <phase>generate-sources</phase> <goals> - <goal>generate</goal> + <goal>add-source</goal> </goals> + <configuration> + <sources> + <source>${basedir}/target/generated-sources/pojo</source> + </sources> + </configuration> </execution> </executions> </plugin> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4f100f3a/streams-contrib/streams-amazon-aws/streams-persist-kinesis/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-amazon-aws/streams-persist-kinesis/pom.xml b/streams-contrib/streams-amazon-aws/streams-persist-kinesis/pom.xml index baa4b97..ff74aec 100644 --- a/streams-contrib/streams-amazon-aws/streams-persist-kinesis/pom.xml +++ b/streams-contrib/streams-amazon-aws/streams-persist-kinesis/pom.xml @@ -80,6 +80,25 @@ <build> <plugins> <plugin> + <groupId>org.apache.streams.plugins</groupId> + <artifactId>streams-plugin-pojo</artifactId> + <version>${project.version}</version> + <configuration> + <sourcePaths> + <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> + </sourcePaths> + <targetDirectory>${project.basedir}/target/generated-sources/pojo</targetDirectory> + <targetPackage>org.apache.streams.amazon.kinesis.pojo</targetPackage> + </configuration> + <executions> + <execution> + <goals> + <goal>generate-sources</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> @@ -91,34 +110,12 @@ </goals> <configuration> <sources> - <source>target/generated-sources/jsonschema2pojo</source> + <source>target/generated-sources/pojo</source> </sources> </configuration> </execution> </executions> </plugin> - <plugin> - <groupId>org.jsonschema2pojo</groupId> - <artifactId>jsonschema2pojo-maven-plugin</artifactId> - <configuration> - <addCompileSourceRoot>true</addCompileSourceRoot> - <generateBuilders>true</generateBuilders> - <sourcePaths> - <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> - </sourcePaths> - <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> - <targetPackage>org.apache.streams.amazon.kinesis.pojo</targetPackage> - <useLongIntegers>true</useLongIntegers> - <useJodaDates>true</useJodaDates> - </configuration> - <executions> - <execution> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> </plugins> </build> </project> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4f100f3a/streams-contrib/streams-amazon-aws/streams-persist-s3/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-amazon-aws/streams-persist-s3/pom.xml b/streams-contrib/streams-amazon-aws/streams-persist-s3/pom.xml index 5151d9d..0c5bbd3 100644 --- a/streams-contrib/streams-amazon-aws/streams-persist-s3/pom.xml +++ b/streams-contrib/streams-amazon-aws/streams-persist-s3/pom.xml @@ -95,6 +95,25 @@ <build> <plugins> <plugin> + <groupId>org.apache.streams.plugins</groupId> + <artifactId>streams-plugin-pojo</artifactId> + <version>${project.version}</version> + <configuration> + <sourcePaths> + <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> + </sourcePaths> + <targetDirectory>${project.basedir}/target/generated-sources/pojo</targetDirectory> + <targetPackage>org.apache.streams.s3.pojo</targetPackage> + </configuration> + <executions> + <execution> + <goals> + <goal>generate-sources</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> @@ -106,35 +125,11 @@ </goals> <configuration> <sources> - <source>target/generated-sources/jsonschema2pojo</source> + <source>target/generated-sources/pojo</source> </sources> </configuration> </execution> </executions> - </plugin> - <plugin> - <groupId>org.jsonschema2pojo</groupId> - <artifactId>jsonschema2pojo-maven-plugin</artifactId> - <configuration> - <addCompileSourceRoot>true</addCompileSourceRoot> - <generateBuilders>true</generateBuilders> - <sourcePaths> - <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/s3/S3Configuration.json</sourcePath> - <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/s3/S3WriterConfiguration.json</sourcePath> - <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/s3/S3ReaderConfiguration.json</sourcePath> - </sourcePaths> - <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> - <targetPackage>org.apache.streams.s3.pojo</targetPackage> - <useLongIntegers>true</useLongIntegers> - <useJodaDates>true</useJodaDates> - </configuration> - <executions> - <execution> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> <dependencies> <dependency> <groupId>org.apache.streams</groupId> @@ -143,6 +138,7 @@ </dependency> </dependencies> </plugin> + </plugins> </build> </project> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4f100f3a/streams-contrib/streams-persist-elasticsearch/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-elasticsearch/pom.xml b/streams-contrib/streams-persist-elasticsearch/pom.xml index d179965..bf13df3 100644 --- a/streams-contrib/streams-persist-elasticsearch/pom.xml +++ b/streams-contrib/streams-persist-elasticsearch/pom.xml @@ -145,38 +145,20 @@ <build> <plugins> <plugin> - <artifactId>maven-clean-plugin</artifactId> - <version>${clean.plugin.version}</version> + <groupId>org.apache.streams.plugins</groupId> + <artifactId>streams-plugin-pojo</artifactId> + <version>${project.version}</version> <configuration> - <filesets> - <fileset> - <directory>src/site/resources</directory> - <followSymlinks>false</followSymlinks> - </fileset> - <!-- this is here because elasticsearch integration tests don't have a setting to change directory where temp index files get created --> - <fileset> - <directory>data</directory> - <followSymlinks>false</followSymlinks> - </fileset> - </filesets> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <configuration> - <includes>**/*.json</includes> - <outputDirectory>${project.build.directory}/test-classes</outputDirectory> - <includeGroupIds>org.apache.streams</includeGroupIds> - <includeArtifactIds>streams-schema-activitystreams</includeArtifactIds> - <includeTypes>test-jar</includeTypes> + <sourcePaths> + <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> + </sourcePaths> + <targetDirectory>${project.basedir}/target/generated-sources/pojo</targetDirectory> + <targetPackage>org.apache.streams.elasticsearch.pojo</targetPackage> </configuration> <executions> <execution> - <id>test-resource-dependencies</id> - <phase>process-test-resources</phase> <goals> - <goal>unpack-dependencies</goal> + <goal>generate-sources</goal> </goals> </execution> </executions> @@ -193,32 +175,28 @@ </goals> <configuration> <sources> - <source>target/generated-sources/jsonschema2pojo</source> + <source>target/generated-sources/pojo</source> </sources> </configuration> </execution> </executions> </plugin> <plugin> - <groupId>org.jsonschema2pojo</groupId> - <artifactId>jsonschema2pojo-maven-plugin</artifactId> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> <configuration> - <addCompileSourceRoot>true</addCompileSourceRoot> - <generateBuilders>true</generateBuilders> - <sourcePaths> - <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/elasticsearch/ElasticsearchConfiguration.json</sourcePath> - <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/elasticsearch/ElasticsearchReaderConfiguration.json</sourcePath> - <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/elasticsearch/ElasticsearchWriterConfiguration.json</sourcePath> - </sourcePaths> - <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> - <targetPackage>org.apache.streams.elasticsearch.pojo</targetPackage> - <useLongIntegers>true</useLongIntegers> - <useJodaDates>true</useJodaDates> + <includes>**/*.json</includes> + <outputDirectory>${project.build.directory}/test-classes</outputDirectory> + <includeGroupIds>org.apache.streams</includeGroupIds> + <includeArtifactIds>streams-schema-activitystreams</includeArtifactIds> + <includeTypes>test-jar</includeTypes> </configuration> <executions> <execution> + <id>test-resource-dependencies</id> + <phase>process-test-resources</phase> <goals> - <goal>generate</goal> + <goal>unpack-dependencies</goal> </goals> </execution> </executions> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4f100f3a/streams-contrib/streams-persist-elasticsearch/src/test/java/org/apache/streams/elasticsearch/test/ElasticsearchPersistUpdaterIT.java ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-elasticsearch/src/test/java/org/apache/streams/elasticsearch/test/ElasticsearchPersistUpdaterIT.java b/streams-contrib/streams-persist-elasticsearch/src/test/java/org/apache/streams/elasticsearch/test/ElasticsearchPersistUpdaterIT.java index 56f102b..d34f53f 100644 --- a/streams-contrib/streams-persist-elasticsearch/src/test/java/org/apache/streams/elasticsearch/test/ElasticsearchPersistUpdaterIT.java +++ b/streams-contrib/streams-persist-elasticsearch/src/test/java/org/apache/streams/elasticsearch/test/ElasticsearchPersistUpdaterIT.java @@ -34,7 +34,7 @@ import org.apache.streams.elasticsearch.ElasticsearchPersistWriter; import org.apache.streams.elasticsearch.ElasticsearchWriterConfiguration; import org.apache.streams.jackson.StreamsJacksonMapper; import org.apache.streams.pojo.json.Activity; -import org.apache.streams.pojo.json.Actor; +import org.apache.streams.pojo.json.ActivityObject; import org.elasticsearch.action.admin.cluster.health.ClusterHealthRequest; import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest; @@ -126,7 +126,7 @@ public class ElasticsearchPersistUpdaterIT { update.setAdditionalProperty("str", "str"); update.setAdditionalProperty("long", 10l); update.setActor( - (Actor) new Actor() + new ActivityObject() .withAdditionalProperty("updated", Boolean.TRUE) .withAdditionalProperty("double", 10d) .withAdditionalProperty("map", http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4f100f3a/streams-contrib/streams-persist-filebuffer/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-filebuffer/pom.xml b/streams-contrib/streams-persist-filebuffer/pom.xml index 2baef27..ce0a37c 100644 --- a/streams-contrib/streams-persist-filebuffer/pom.xml +++ b/streams-contrib/streams-persist-filebuffer/pom.xml @@ -103,6 +103,25 @@ </testResources> <plugins> <plugin> + <groupId>org.apache.streams.plugins</groupId> + <artifactId>streams-plugin-pojo</artifactId> + <version>${project.version}</version> + <configuration> + <sourcePaths> + <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> + </sourcePaths> + <targetDirectory>${project.basedir}/target/generated-sources/pojo</targetDirectory> + <targetPackage>org.apache.streams.file.pojo</targetPackage> + </configuration> + <executions> + <execution> + <goals> + <goal>generate-sources</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> @@ -114,34 +133,12 @@ </goals> <configuration> <sources> - <source>target/generated-sources/jsonschema2pojo</source> + <source>target/generated-sources/pojo</source> </sources> </configuration> </execution> </executions> </plugin> - <plugin> - <groupId>org.jsonschema2pojo</groupId> - <artifactId>jsonschema2pojo-maven-plugin</artifactId> - <configuration> - <addCompileSourceRoot>true</addCompileSourceRoot> - <generateBuilders>true</generateBuilders> - <sourcePaths> - <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> - </sourcePaths> - <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> - <targetPackage>org.apache.streams.file.pojo</targetPackage> - <useLongIntegers>true</useLongIntegers> - <useJodaDates>true</useJodaDates> - </configuration> - <executions> - <execution> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> </plugins> </build> </project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4f100f3a/streams-contrib/streams-persist-graph/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-graph/pom.xml b/streams-contrib/streams-persist-graph/pom.xml index a5fe203..b8db538 100644 --- a/streams-contrib/streams-persist-graph/pom.xml +++ b/streams-contrib/streams-persist-graph/pom.xml @@ -104,6 +104,32 @@ </testResources> <plugins> <plugin> + <groupId>org.apache.streams.plugins</groupId> + <artifactId>streams-plugin-pojo</artifactId> + <version>${project.version}</version> + <configuration> + <sourcePaths> + <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> + </sourcePaths> + <targetDirectory>${project.basedir}/target/generated-sources/pojo</targetDirectory> + <targetPackage>org.apache.streams.graph.pojo</targetPackage> + </configuration> + <executions> + <execution> + <goals> + <goal>generate-sources</goal> + </goals> + </execution> + </executions> + <dependencies> + <dependency> + <groupId>org.apache.streams</groupId> + <artifactId>streams-http</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </plugin> + <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> @@ -115,35 +141,13 @@ </goals> <configuration> <sources> - <source>target/generated-sources/jsonschema2pojo</source> + <source>target/generated-sources/pojo</source> </sources> </configuration> </execution> </executions> </plugin> <plugin> - <groupId>org.jsonschema2pojo</groupId> - <artifactId>jsonschema2pojo-maven-plugin</artifactId> - <configuration> - <addCompileSourceRoot>true</addCompileSourceRoot> - <generateBuilders>true</generateBuilders> - <sourcePaths> - <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> - </sourcePaths> - <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> - <targetPackage>org.apache.streams.graph.pojo</targetPackage> - <useLongIntegers>true</useLongIntegers> - <useJodaDates>true</useJodaDates> - </configuration> - <executions> - <execution> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <configuration> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4f100f3a/streams-contrib/streams-persist-graph/src/main/java/org/apache/streams/graph/GraphHttpPersistWriter.java ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-graph/src/main/java/org/apache/streams/graph/GraphHttpPersistWriter.java b/streams-contrib/streams-persist-graph/src/main/java/org/apache/streams/graph/GraphHttpPersistWriter.java index a26168c..3c97fd7 100644 --- a/streams-contrib/streams-persist-graph/src/main/java/org/apache/streams/graph/GraphHttpPersistWriter.java +++ b/streams-contrib/streams-persist-graph/src/main/java/org/apache/streams/graph/GraphHttpPersistWriter.java @@ -38,7 +38,6 @@ import org.apache.streams.graph.neo4j.Neo4jHttpGraphHelper; import org.apache.streams.jackson.StreamsJacksonMapper; import org.apache.streams.pojo.json.Activity; import org.apache.streams.pojo.json.ActivityObject; -import org.apache.streams.pojo.json.Actor; import org.apache.streams.pojo.json.Provider; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -140,7 +139,7 @@ public class GraphHttpPersistWriter extends SimpleHTTPPostPersistWriter { if( activity != null ) { - Actor actor = activity.getActor(); + ActivityObject actor = activity.getActor(); Provider provider = activity.getProvider(); if( provider != null && http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4f100f3a/streams-contrib/streams-persist-graph/src/test/java/org/apache/streams/graph/test/TestCypherQueryGraphHelper.java ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-graph/src/test/java/org/apache/streams/graph/test/TestCypherQueryGraphHelper.java b/streams-contrib/streams-persist-graph/src/test/java/org/apache/streams/graph/test/TestCypherQueryGraphHelper.java index a88ce16..3f889aa 100644 --- a/streams-contrib/streams-persist-graph/src/test/java/org/apache/streams/graph/test/TestCypherQueryGraphHelper.java +++ b/streams-contrib/streams-persist-graph/src/test/java/org/apache/streams/graph/test/TestCypherQueryGraphHelper.java @@ -21,7 +21,6 @@ package org.apache.streams.graph.test; import org.apache.streams.graph.neo4j.CypherQueryGraphHelper; import org.apache.streams.pojo.json.Activity; import org.apache.streams.pojo.json.ActivityObject; -import org.apache.streams.pojo.json.Actor; import org.javatuples.Pair; import org.junit.Test; @@ -86,15 +85,15 @@ public class TestCypherQueryGraphHelper { @Test public void createEdgeRequestTest() throws Exception { - Actor actor = new Actor(); + ActivityObject actor = new ActivityObject(); actor.setId("actor"); actor.setObjectType("type"); actor.setContent("content"); - ActivityObject activityObject = new ActivityObject(); - activityObject.setId("object"); - activityObject.setObjectType("type"); - activityObject.setContent("content"); + ActivityObject object = new ActivityObject(); + object.setId("object"); + object.setObjectType("type"); + object.setContent("content"); Activity activity = new Activity(); activity.setId("activity"); @@ -102,7 +101,7 @@ public class TestCypherQueryGraphHelper { activity.setContent("content"); activity.setActor(actor); - activity.setObject(activityObject); + activity.setObject(object); Pair<String, Map<String, Object>> queryAndParams = helper.createEdgeRequest(activity); http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4f100f3a/streams-contrib/streams-persist-hbase/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-hbase/pom.xml b/streams-contrib/streams-persist-hbase/pom.xml index d097a6a..af094cd 100644 --- a/streams-contrib/streams-persist-hbase/pom.xml +++ b/streams-contrib/streams-persist-hbase/pom.xml @@ -107,6 +107,25 @@ <build> <plugins> <plugin> + <groupId>org.apache.streams.plugins</groupId> + <artifactId>streams-plugin-pojo</artifactId> + <version>${project.version}</version> + <configuration> + <sourcePaths> + <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> + </sourcePaths> + <targetDirectory>${project.basedir}/target/generated-sources/pojo</targetDirectory> + <targetPackage>org.apache.streams.hbase.pojo</targetPackage> + </configuration> + <executions> + <execution> + <goals> + <goal>generate-sources</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> @@ -118,34 +137,12 @@ </goals> <configuration> <sources> - <source>target/generated-sources/jsonschema2pojo</source> + <source>target/generated-sources/pojo</source> </sources> </configuration> </execution> </executions> </plugin> - <plugin> - <groupId>org.jsonschema2pojo</groupId> - <artifactId>jsonschema2pojo-maven-plugin</artifactId> - <configuration> - <addCompileSourceRoot>true</addCompileSourceRoot> - <generateBuilders>true</generateBuilders> - <sourcePaths> - <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/hbase/HbaseConfiguration.json</sourcePath> - </sourcePaths> - <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> - <targetPackage>org.apache.streams.hbase.pojo</targetPackage> - <useLongIntegers>true</useLongIntegers> - <useJodaDates>true</useJodaDates> - </configuration> - <executions> - <execution> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> </plugins> </build> </project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4f100f3a/streams-contrib/streams-persist-hdfs/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-hdfs/pom.xml b/streams-contrib/streams-persist-hdfs/pom.xml index 3a722cf..0cefa91 100644 --- a/streams-contrib/streams-persist-hdfs/pom.xml +++ b/streams-contrib/streams-persist-hdfs/pom.xml @@ -154,41 +154,20 @@ </testResources> <plugins> <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <executions> - <execution> - <id>add-source</id> - <phase>generate-sources</phase> - <goals> - <goal>add-source</goal> - </goals> - <configuration> - <sources> - <source>target/generated-sources/jsonschema2pojo</source> - </sources> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.jsonschema2pojo</groupId> - <artifactId>jsonschema2pojo-maven-plugin</artifactId> + <groupId>org.apache.streams.plugins</groupId> + <artifactId>streams-plugin-pojo</artifactId> + <version>${project.version}</version> <configuration> - <addCompileSourceRoot>true</addCompileSourceRoot> - <generateBuilders>true</generateBuilders> <sourcePaths> <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> </sourcePaths> - <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> - <targetPackage>org.apache.streams.hdfs.pojo</targetPackage> - <useLongIntegers>true</useLongIntegers> - <useJodaDates>true</useJodaDates> + <targetDirectory>${project.basedir}/target/generated-sources/pojo</targetDirectory> + <targetPackage>org.apache.streams.hdfs</targetPackage> </configuration> <executions> <execution> <goals> - <goal>generate</goal> + <goal>generate-sources</goal> </goals> </execution> </executions> @@ -201,6 +180,24 @@ </dependencies> </plugin> <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <executions> + <execution> + <id>add-source</id> + <phase>generate-sources</phase> + <goals> + <goal>add-source</goal> + </goals> + <configuration> + <sources> + <source>target/generated-sources/pojo</source> + </sources> + </configuration> + </execution> + </executions> + </plugin> + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4f100f3a/streams-contrib/streams-persist-kafka/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-kafka/pom.xml b/streams-contrib/streams-persist-kafka/pom.xml index 4bdb8f2..b055f05 100644 --- a/streams-contrib/streams-persist-kafka/pom.xml +++ b/streams-contrib/streams-persist-kafka/pom.xml @@ -130,6 +130,25 @@ <build> <plugins> <plugin> + <groupId>org.apache.streams.plugins</groupId> + <artifactId>streams-plugin-pojo</artifactId> + <version>${project.version}</version> + <configuration> + <sourcePaths> + <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> + </sourcePaths> + <targetDirectory>${project.basedir}/target/generated-sources/pojo</targetDirectory> + <targetPackage>org.apache.streams.kafka.pojo</targetPackage> + </configuration> + <executions> + <execution> + <goals> + <goal>generate-sources</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> @@ -141,34 +160,12 @@ </goals> <configuration> <sources> - <source>target/generated-sources/jsonschema2pojo</source> + <source>target/generated-sources/pojo</source> </sources> </configuration> </execution> </executions> </plugin> - <plugin> - <groupId>org.jsonschema2pojo</groupId> - <artifactId>jsonschema2pojo-maven-plugin</artifactId> - <configuration> - <addCompileSourceRoot>true</addCompileSourceRoot> - <generateBuilders>true</generateBuilders> - <sourcePaths> - <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/kafka/KafkaConfiguration.json</sourcePath> - </sourcePaths> - <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> - <targetPackage>org.apache.streams.kafka.pojo</targetPackage> - <useLongIntegers>true</useLongIntegers> - <useJodaDates>true</useJodaDates> - </configuration> - <executions> - <execution> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> </plugins> </build> </project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4f100f3a/streams-contrib/streams-persist-mongo/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-persist-mongo/pom.xml b/streams-contrib/streams-persist-mongo/pom.xml index e81a367..3183455 100644 --- a/streams-contrib/streams-persist-mongo/pom.xml +++ b/streams-contrib/streams-persist-mongo/pom.xml @@ -88,6 +88,25 @@ <build> <plugins> <plugin> + <groupId>org.apache.streams.plugins</groupId> + <artifactId>streams-plugin-pojo</artifactId> + <version>${project.version}</version> + <configuration> + <sourcePaths> + <sourcePath>${project.basedir}/src/main/jsonschema</sourcePath> + </sourcePaths> + <targetDirectory>${project.basedir}/target/generated-sources/pojo</targetDirectory> + <targetPackage>org.apache.streams.mongo.pojo</targetPackage> + </configuration> + <executions> + <execution> + <goals> + <goal>generate-sources</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> @@ -99,35 +118,13 @@ </goals> <configuration> <sources> - <source>target/generated-sources/jsonschema2pojo</source> + <source>target/generated-sources/pojo</source> </sources> </configuration> </execution> </executions> </plugin> <plugin> - <groupId>org.jsonschema2pojo</groupId> - <artifactId>jsonschema2pojo-maven-plugin</artifactId> - <configuration> - <addCompileSourceRoot>true</addCompileSourceRoot> - <generateBuilders>true</generateBuilders> - <sourcePaths> - <sourcePath>${project.basedir}/src/main/jsonschema/org/apache/streams/mongo/MongoConfiguration.json</sourcePath> - </sourcePaths> - <outputDirectory>target/generated-sources/jsonschema2pojo</outputDirectory> - <targetPackage>org.apache.streams.mongo.pojo</targetPackage> - <useLongIntegers>true</useLongIntegers> - <useJodaDates>true</useJodaDates> - </configuration> - <executions> - <execution> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/4f100f3a/streams-contrib/streams-processor-peoplepattern/pom.xml ---------------------------------------------------------------------- diff --git a/streams-contrib/streams-processor-peoplepattern/pom.xml b/streams-contrib/streams-processor-peoplepattern/pom.xml index 8d010e6..f2f1e4c 100644 --- a/streams-contrib/streams-processor-peoplepattern/pom.xml +++ b/streams-contrib/streams-processor-peoplepattern/pom.xml @@ -119,8 +119,9 @@ </executions> </plugin> <plugin> - <groupId>org.jsonschema2pojo</groupId> - <artifactId>jsonschema2pojo-maven-plugin</artifactId> + <groupId>org.apache.streams.plugins</groupId> + <artifactId>streams-plugin-pojo</artifactId> + <version>${project.version}</version> <configuration> <addCompileSourceRoot>true</addCompileSourceRoot> <generateBuilders>true</generateBuilders> @@ -135,7 +136,7 @@ <executions> <execution> <goals> - <goal>generate</goal> + <goal>generate-sources</goal> </goals> </execution> </executions>