You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streams.apache.org by steveblackmon <gi...@git.apache.org> on 2016/06/01 18:00:38 UTC

[GitHub] incubator-streams pull request #284: source and resource generation modules

GitHub user steveblackmon opened a pull request:

    https://github.com/apache/incubator-streams/pull/284

    source and resource generation modules

    adds maven plugins to generate source code and resource files for several technologies
    resolves STREAMS-389
    resolves STREAMS-398
    this is a big PR, BUT nearly all of it is new greenfield modules and there should be little to no impact on other modules at this point.
    
    once the the java source generation capability specifically is ready, two additional steps are appropriate:
    a) refactor out usage of org.jsonschema2pojo:jsonschema2pojo-maven-plugin and instead rely on org.apache.streams:streams-plugin-pojo 
    b) replace references to the jsonschemas in streams-pojo with references to the jsonschemas in streams-schema-activitystreams.  the generated / compiled pojo can still reside in streams-pojo just the process by which they are built and the schemas themselves will be factored out for re-use elsewhere.
    
    there are many many ways we can improve the individual generators and the common libraries underlying schema resolution and schema-driven generation. this PR merges the proof-of-concept starting point for that effort.
    
    more details at http://sblackmon-apache-org.herokuapp.com/apacheconna2016-schemas.html

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/incubator-streams STREAMS-389

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-streams/pull/284.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #284
    
----
commit 50f67bf8d97a61bb325f8524472f5c20e86287d0
Author: Steve Blackmon (@steveblackmon) <sb...@apache.org>
Date:   2015-12-29T23:19:15Z

    start of implementation for STREAMS-398

commit ded4ad68d41c8b158fdca3f249a57055eab095f8
Author: Steve Blackmon @steveblackmon <sb...@apache.org>
Date:   2016-03-28T13:32:00Z

    create streams-plugin-pojo

commit 7d318c3fba9faf106eed8797263d52114a312d6c
Author: Steve Blackmon @steveblackmon <sb...@apache.org>
Date:   2016-03-28T13:32:19Z

    rename Hive Generator

commit 387da685f37a7135d556f4f645a3e77e6138f958
Author: Steve Blackmon @steveblackmon <sb...@apache.org>
Date:   2016-03-28T13:32:27Z

    test pom for streams-plugin-pojo

commit 0424855cf0a4fd15be298906922333ae74c8e9ae
Author: Steve Blackmon @steveblackmon <sb...@apache.org>
Date:   2016-04-21T16:41:59Z

    STREAMS-398 - streams-schemas
    
    moves jsonschemas to a seperate module
      this averts dependency graph cycle that would occur once streams-plugin-pojo is a dependency of streams-pojo and streams-scala

commit 7b8ef0a22707af88426c18e0869ad01a261602c5
Author: Steve Blackmon @steveblackmon <sb...@apache.org>
Date:   2016-04-21T16:42:44Z

    STREAMS-398 - pojo generation
    
    code and plugin for generating POJOs now resides in streams-project
    unit testing for generating POJOs without maven
    unit testing for generating POJOs with maven

commit e84dcd7230f02087db2b6bf7ea6d2148d585e77d
Author: Steve Blackmon @steveblackmon <sb...@apache.org>
Date:   2016-05-03T21:32:58Z

    hive generation is looking pretty good

commit 114c1c5ff31447a0ab85d9a2518d5ce08284d3ff
Author: Steve Blackmon @steveblackmon <sb...@apache.org>
Date:   2016-05-03T21:33:47Z

    re-enable hive plugin

commit 61f2736a9424516606b9f7544b894cb81f65922c
Author: Steve Blackmon (@steveblackmon) <sb...@apache.org>
Date:   2015-12-07T20:48:38Z

    first take at STREAMS-389: streams-project/streams-plugins/streams-plugin-scala

commit 1bc84dbc614cc0537e3238a6786a005f609b429c
Author: Steve Blackmon @steveblackmon <sb...@apache.org>
Date:   2016-05-07T00:45:12Z

    WIP for apachecon

commit d9674f7c0706d0e170f123c461d22e56e8f73807
Author: Steve Blackmon @steveblackmon <sb...@apache.org>
Date:   2016-06-01T17:32:14Z

    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

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-streams issue #284: source and resource generation modules

Posted by mfranklin <gi...@git.apache.org>.
Github user mfranklin commented on the issue:

    https://github.com/apache/incubator-streams/pull/284
  
    OK.  Just to make sure, there is no other project that offers what we need?  Just looking to keep the surface area of maintained code core to what the project needs. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-streams issue #284: source and resource generation modules

Posted by steveblackmon <gi...@git.apache.org>.
Github user steveblackmon commented on the issue:

    https://github.com/apache/incubator-streams/pull/284
  
    @BigBlueHat every release version and the latest snapshot version of every schema in the project is published on the streams website for the reasons you mention.
    
    See for example:
    http://streams.incubator.apache.org/site/latest/streams-project/streams-contrib/streams-provider-twitter/index.html
    
    I was not aware of schema-store.org but perhaps we could use them as a mirror to help developers discover our schemas.
    
    I'll work on merging this into master and polishing up website documentation on how to use the various plugins unless anyone objects in the next 48 hours.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-streams pull request #284: source and resource generation modules

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-streams/pull/284


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-streams issue #284: source and resource generation modules

Posted by mfranklin <gi...@git.apache.org>.
Github user mfranklin commented on the issue:

    https://github.com/apache/incubator-streams/pull/284
  
    Just to be clear, the reason we needed a custom plugin here was because we wanted to be able to generate different output sources than what the default plugin offers, correct?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-streams issue #284: source and resource generation modules

Posted by BigBlueHat <gi...@git.apache.org>.
Github user BigBlueHat commented on the issue:

    https://github.com/apache/incubator-streams/pull/284
  
    The extraction of the JSON Schemas as standalone documents is actually a huge step forward for this project and a great "front door" to increase interest in activity here. OpenAPI (fka Swagger), RAML, and many other API generation/documentation tool kits all support JSON Schema. There's a growing interest (in part due to that) in JSON Schemas in general, and it can be expected that this will only increase in the coming years and that the JSON Schema community will grow and re-visit their in-progress v5, etc.
    
    Additionally, having a set of static resources (these JSON Schemas) as output from this project means vastly more people (not just Java developers) can not only benefit from them, but also contribute to them.
    
    Eventually, I'd love to see these published on the Apache Streams site directly and/or contributed to http://schemastore.org/json/ (and similar projects).
    
    The goal being here to provide "kit" (JSON Schemas mostly) that is broadly applicable to social stream data along side code that proves it's value (the Java bits).
    
    There's certainly more doors that open with this code than ones that close. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-streams issue #284: source and resource generation modules

Posted by steveblackmon <gi...@git.apache.org>.
Github user steveblackmon commented on the issue:

    https://github.com/apache/incubator-streams/pull/284
  
    If another TLP or incubator project were taking this on that would great. I looked but couldn't find anything at Apache.  The only projects anywhere near this problem space are Velocity and Freemarker, but json / json schemas are completely foreign to their implementations and they definitely don't have any support for traversing links between schema references across the web.
    
    As to whether this is core or not, fair question.   If we want to help developers actually use the json datasets that streams collects, some schema-aware binding with external systems and code is necessary.  Nearly every streams module uses code generation from schema and all of the examples rely on at least one database that has a concept of schema, so I see this work as a consolidation of that reality.
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-streams issue #284: source and resource generation modules

Posted by steveblackmon <gi...@git.apache.org>.
Github user steveblackmon commented on the issue:

    https://github.com/apache/incubator-streams/pull/284
  
    org.jsonschema2pojo:jsonschema2pojo-maven-plugin was great early on, but:
    it only generates POJOs.  
    it does so in a way that is not extensible to generating other types of artifacts.
    it is not easily over-ridden to (for example) change which annotations get added, or under what circumstances.
    
    by bringing the plugin in-house we gain adequate control to impact the generated artifacts as we see fit.
    
    this PR also establish a pattern for generating other types of artifacts from the schemas maintained by the project, with solid testing around those routines - and isolates schemas into modules apart from implementation which is an important early step toward supporting new vocabularies (AS 2.0, schema.org, etc...)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---