Building an extension project
The kind people at Neo4j are always keen to ease the workload of their users, so they have created a Maven-based template project on GitHub for us to get a quickstart on our functions and procedures. This way, no time is wasted looking for the dependencies.
Cheers guys!
The project is hosted at https://github.com/neo4j-examples/neo4j-procedure-template. You can either download or clone it, and then open your copy in your favorite Java IDE. In the pom.xml
file, update the neo4j.version
property with the value corresponding to the version of the Neo4j server that you use. In my case, it is the following:
<properties> <neo4j.version>3.2.0</neo4j.version> </properties>
Build the project with your IDE. There should be no error at this stage. We will use the same project for all kinds of code we will write.
Creating a function
This is not rocket science, a function is just a method in a Java class. This method must be annotated with @UserFunction...