【问题标题】:Can't find dependency for org.neo4j:neo4j-cypher-dsl:jar:2.0.1找不到 org.neo4j:neo4j-cypher-dsl:jar:2.0.1 的依赖项
【发布时间】:2016-06-28 07:48:11
【问题描述】:

我试图从 pom.xml 下方给出的存储库中获取依赖项。

<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.tp.neo4j </groupId>
    <artifactId> springdata-neo4j </artifactId>
    <version> 1.0 </version>

    <dependencies>
        <dependency>
            <groupId> org.springframework.data </groupId>
            <artifactId> spring-data-neo4j </artifactId>
            <version> 3.1.2.RELEASE </version>
        </dependency>
    </dependencies>
</project>

org.neo4j:neo4j-cypher-dsl:jar:2.0.1 之外的所有依赖项都已下载。并显示以下错误。

[INFO] Building springdata-neo4j 1.0
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.neo4j:neo4j-cypher-dsl:jar:2.0.1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.409s
[INFO] Finished at: Tue Jun 28 13:07:07 IST 2016
[INFO] Final Memory: 6M/153M
[INFO] ------------------------------------------------------------------------
[ERROR]Failed to execute goal on project springdata-neo4j: Could not resolve dependencies for project com.tp.neo4j:springdata-neo4j:jar:1.0: Failure to find org.neo4j:neo4j-cypher-dsl:jar:2.0.1 in https://maven......../repositories/core-releases was cached in the local repository, resolution will not be reattempted until the update interval of core-releases has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

我尝试排除相同的内容。但还是不行。

            <exclusions>
                <exclusion>
                    <groupId>org.neo4j</groupId>
                    <artifactId>neo4j-cypher</artifactId>
                </exclusion>
            </exclusions>

我删除了\.m2\repository\org\neo4j 文件夹并再次尝试。还是行不通。我注意到 neo4j-cypher-dsl 的版本为 2.0.1,但几乎所有其他版本都有 2.2.5。我想知道,为什么核心版本中只缺少一个依赖项。

【问题讨论】:

    标签: neo4j maven-3 spring-data-neo4j


    【解决方案1】:

    你为什么用这么旧的版本?这几乎已经过时了 2 年?

    您必须将 m2.neo4j.org 作为 maven 存储库添加到您的存储库部分。

    【讨论】:

    • 它适用于&lt;artifactId&gt;spring-data-neo4j&lt;/artifactId&gt; &lt;version&gt;4.0.0.RELEASE&lt;/version&gt;。但现在在org.springframework.data.neo4j.repository.GraphRepository 上显示编译错误。 The import org.springframework cannot be resolved.
    • 已添加 &lt;repositories&gt; &lt;repository&gt; &lt;id&gt;spring-releases&lt;/id&gt; &lt;name&gt;Spring Releases&lt;/name&gt; &lt;url&gt;https://repo.spring.io/libs-release&lt;/url&gt; &lt;/repository&gt; &lt;repository&gt; &lt;id&gt;neo4j&lt;/id&gt; &lt;name&gt;Neo4j&lt;/name&gt; &lt;url&gt;http://m2.neo4j.org/&lt;/url&gt; &lt;/repository&gt; &lt;/repositories&gt; 。还是一样的错误。
    • 升级版本时能发一下异常吗?你应该考虑使用这个版本并专注于这个,以便找出问题所在,而不是像迈克尔所说的那样使用旧版本。
    • @NaaN m2.neo4j.org 不是实际的存储库,而只是登录页面。您可以在存储库选项卡中找到存储库列表。您可以使用例如https://m2.neo4j.org/content/repositories/releases
    猜你喜欢
    • 1970-01-01
    • 2021-01-21
    • 2017-04-11
    • 2016-10-01
    • 2019-10-28
    • 2020-04-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多