我已从以下位置下载了弹簧数据neo4j rest代码
https://spring.io/guides/gs/accessing-neo4j-data-rest/
当我运行maven命令打包时,我收到了以下错误。
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building gs-accessing-neo4j-data-rest 0.1.0
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/org/neo4j/neo4j-cypher-dsl/2.0.1/neo4j-cypher-dsl-2.0.1.pom
[WARNING] The POM for org.neo4j:neo4j-cypher-dsl:jar:2.0.1 is missing, no dependency information available
Downloading: https://repo.maven.apache.org/maven2/org/neo4j/neo4j-cypher-dsl/2.0.1/neo4j-cypher-dsl-2.0.1.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.861 s
[INFO] Finished at: 2015-08-04T03:53:47-04:00
[INFO] Final Memory: 14M/60M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project gs-accessing-neo4j-data-rest: Could not resolve dependencies for project org.springframework:gs-accessing-neo4j-data-rest:jar:0.1.0: Could not find artifact org.neo4j:neo4j-cypher-dsl:jar:2.0.1 in central (https://repo.maven.apache.org/maven2) -> [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
我不知道如何解决这个问题。任何人都可以帮助我。
答案 0 :(得分:2)
将以下部分添加到主pom.xml中,以便Maven能够找到并下载缺失的工件:
<repositories>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/libs-release</url>
</repository>
<repository>
<id>neo4j</id>
<name>Neo4j</name>
<url>http://m2.neo4j.org/</url>
</repository>
</repositories>