mickaelw
mickaelw

Reputation: 1513

Resolver for spring-data-neo4j

I want to use spring-data-neo4j with play framework 2.6 in Scala. But when I add the library dependency I have a compilation error:

object neo4j is not a member of package org

for

import org.neo4j.ogm.annotation.{GraphId, NodeEntity} 

I think I don't have good resolvers:

name := """Project-name"""

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayScala)

resolvers += Resolver.sonatypeRepo("snapshots")

scalaVersion := "2.12.2"

libraryDependencies ++= Seq(
  guice,
  "org.scalatestplus.play" %% "scalatestplus-play" % "3.0.0" % Test,
  "com.h2database" % "h2" % "1.4.194",
  "org.springframework.data" % "spring-data-neo4j" % "4.2.6.RELEASE"
)

Upvotes: 1

Views: 42

Answers (1)

rogue-one
rogue-one

Reputation: 11587

The classes you are trying to import import org.neo4j.ogm.annotation.{GraphId, NodeEntity} is part of neo4j-ogm-core artifact. so you must include it as shown below to able to access those classes.

libraryDependencies += "org.neo4j" % "neo4j-ogm-core" % "3.0.0-RC1"

Upvotes: 2

Related Questions