简体   繁体   English

无法与Gradle一起使用spring-data-neo4j:2.3.1.RELEASE

[英]Unable to use spring-data-neo4j:2.3.1.RELEASE with Gradle

I'm using gradle and need to bring the latest Spring Data Neo4j into my project. 我正在使用gradle,需要将最新的Spring Data Neo4j引入我的项目。

My build file includes - 我的构建文件包括-

repositories {   
      mavenCentral()

      maven{
          url 'http://m2.neo4j.org/content/repositories/releases/org/neo4j/neo4j-cypher-dsl/1.9.M04'
      }
}

dependencies {
     compile 'org.springframework.data:spring-data-neo4j:2.3.1.RELEASE'
}

My question seems almost the same as this one: 我的问题似乎与此几乎相同:

Unable to use Neo4j 1.9.M05 无法使用Neo4j 1.9.M05

and this one: 还有这个:

Unable to find neo4j-cypher-dsl version 1.9.M04 anywhere 在任何地方都找不到neo4j-cypher-dsl版本1.9.M04

When I run 'gradle build' I get the following error: 当我运行“ gradle build”时,出现以下错误:

* What went wrong:
Could not resolve all dependencies for configuration ':runtime'.
Could not find org.neo4j:neo4j-cypher-dsl:1.9.
      Required by:
         :my_project > org.springframework.data:spring-data-neo4j:2.3.1.RELEASE

Any help is much appreciated. 任何帮助深表感谢。

The latest version of neo4j-cypher-dsl in Maven Central is 1.7 (easy to find out on http://search.maven.org ). Maven Central中的neo4j-cypher-dsl最新版本为1.7(可在http://search.maven.org上轻松找到)。 If you need 1.9, you'll have to declare a repository that contains that version. 如果需要1.9,则必须声明一个包含该版本的存储库。 Your (second) repository declaration is invalid because the URL doesn't point to a Maven repository but to a particular Maven module within that repository. 您的(第二个)存储库声明无效,因为URL指向的不是Maven存储库,而是指向该存储库中的特定Maven模块。

Thanks to Peter, I was able to get the build script right and point it to the alternative repo: 多亏了Peter,我得以正确地构建脚本并将其指向备用仓库:

maven{
    url 'http://m2.neo4j.org/content/repositories/releases'
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM