To add some more, The blank archetypes for some TinkerPop environment can include sample junit test cases. This will show the user TinkerPop's suggestion as to how to write proper test cases for the environment.
For Neo4j the @Before can include starting the graph and the @After closing it and possibly deleting the actual db files. One of the great joys I have had with embedded graphs is how easy it is to write test cases without any mocking or stubbing involved. Test code == Production code. Cheers Pieter On 13/01/2016 18:20, pieter-gmail wrote: > Yes both, the examples themselves could have an archetype that creates > the stub example project for users to play with. The example archetypes > could include the sample dataset, sample gremlin queries... > > Further there could be blank archetypes for all the different > environments that TinkerPop natively supports. > The main benefit is just to default the users pom, so that the user can > happily start coding away with everything compiling. > > If there are blank archetypes it could even make it into the main > 'Getting Started' documentation. > mvn archtype tinkerpop-plain > import favorite ide > code away > Graph.open(...) > graph.addVertex(...) > > mvn archetype tinkerpop-gremlin-server > start server > curl this that > > A rather long time ago I created archetypes, kinda forgotten now but > basically you create stub project mostly by hand, published it in maven > central and voila, the users run a 'mvn something' command and they get > the latest greatest incarnation of some TinkerPop environment as an > empty maven project. > > Many people, myself included seldom read documentation from top to > bottom. Rather one is anxious to just see something and the read the > docs as the need arises. The seeing part includes not wanting to be > frustrated by dependency versions, configuration et all to get up and > running. > > Cheers > Pieter > > On 13/01/2016 16:43, Stephen Mallette wrote: >> Jason/Pieter, are you guys saying that you would prefer the publishing of >> an archtype over having gremlin-examples code? or are you saying you would >> have both? also, i spent a very short period of time looking at how to >> publish archtypes and didn't get the answers i wanted in that time - do >> either of you have experience with how that is done to offer a short >> synopsis? >> >> On Sun, Jan 10, 2016 at 12:34 PM, Jason Plurad <plur...@gmail.com> wrote: >> >>> +1 I like the Maven archetype idea to encourage folks to build their own >>> projects. Great suggestion, Pieter. >>> On Sun, Jan 10, 2016 at 2:03 AM pieter-gmail <pieter.mar...@gmail.com> >>> wrote: >>> >>>> I have not looked at Jason's project but publishing some maven >>>> archetypes will be useful. Especially for the more complex setups with >>>> Hadoop, Spark, Neo4j etc. >>>> >>>> Cheers >>>> Pieter >>>> >>>> On 09/01/2016 21:07, Stephen Mallette wrote: >>>>> I was thinking that it might be cool to add a gremlin-examples >>> sub-module >>>>> that contained other sub-modules inside of that. Jason's "example >>>> project" >>>>> gets a lot of references and that's awesome but I'm starting to think >>> we >>>>> should fold it into the core repository (if he wants to do that, of >>>> course, >>>>> or we create a new one). >>>>> >>>>> I think we need to have sub-modules under gremlin-examples as there are >>>>> different types of examples folks might set up. There are ones like >>>>> Jason's that sorta demonstrate how to get going with a basic maven >>>> project, >>>>> then there are ones that might focus on gremlin-driver type >>> applications, >>>>> etc. I don't think we would publish new artifacts or anything for >>> these >>>>> projects but it would be nice to be able to directly reference them in >>>>> documentation and stuff and have them link right to TinkerPop code. >>>>> Thoughts? >>>>>