How to set up a Maven project with Neo4j in Eclipse

Peter Neubauer

Hi all,
repeatedly there are questions on how to set up Neo4j with Eclipse and the Maven integration for it .

Here is the short version:

First, choose to create a new maven project:

Eclipse New wizard with Maven Project selected

Second, choose the default maven quickstart archetype for it:

New Maven Project dialog with the maven-archetype-quickstart archetype selected

Now, after choosing a package namespace and project artifact id, wait for the project to created and go to the dependency tab of the pom.xml. Here, add the relevant neo4j dependency by searching for “neo4j”:

Eclipse Select Dependency dialog with search results for neo4j

Finally, after saving the pom.xml, you should see all the imported and mounted dependencies in your project:

Eclipse project showing the Neo4j JAR dependencies imported by Maven

Here you go, happy hacking!

Special thanks to Mahdi Negahi for bringing this up


/peter neubauer

Want to learn more about graph databases? Click below to get your free copy of O’Reilly’s Graph Databases ebook and discover how to use graph technologies for your application today.

Download My Ebook