Reputation: 541
I wanted to use the neo4j-jdbc (https://github.com/neo4j-contrib/neo4j-jdbc) to connect to my Neo4j 3.0 server. I'd like to build the driver myself so that I can add it to another project as a jar file. I'm struggling to understand the readme on the official repo.
Could someone please explain how to do this, I'm hoping to clone the repo and build in Eclipse. I understand how to clone the repo it's how you go about building the driver.
Many thanks,
Upvotes: 0
Views: 85
Reputation: 344
As you said in the comments it seems that you want to simply connect to a Neo4j server, and as most people recommend you should use Maven or Gradle to work with your dependecies.
For that you're gonna need to create a new Maven Project:
and when you finish creating you're gonna have a project similar to this one, the one file you're looking to add this capability to connect to Neo4j is the pom.xml
:
To be able to connect to Neo4j simply add this to the <dependencies></dependencies>
tag:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc</artifactId>
<version>3.0</version>
</dependency>
Here's an example of a pom.xml
created automaticly by a Spring Starter Project:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.6.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
Upvotes: 1