无法解析项目 com.neo:Neo4j:jar:0.0.1-SNAPSHOT 的依赖项:找不到 org.neo4j:neo4j-spatial:jar:0.25.5-neo4j-3.4.0

Could not resolve dependencies for project com.neo:Neo4j:jar:0.0.1-SNAPSHOT: Failure to find org.neo4j:neo4j-spatial:jar:0.25.5-neo4j-3.4.0

我正在尝试将 Neo-4j-spatial 插件导入我的项目,但我以构建失败而告终。请帮忙

[ERROR] Failed to execute goal on project Neo4j: Could not resolve dependencies for project com.neo:Neo4j:jar:0.0.1-SNAPSHOT: Failure to find org.neo4j:neo4j-spatial:jar:0.25.5-neo4j-3.4.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

pom.xml

<?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.neo</groupId>
<artifactId>Neo4j</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Neo4j</name>
<description>Demo project for Spring Boot</description>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.2.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-data-jpa</artifactId>
    </dependency> -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-neo4j</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.neo4j</groupId>
      <artifactId>neo4j-spatial</artifactId>
      <version>0.25.5-neo4j-3.4.0</version>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

我想将几何形状添加到数据库中,因此我需要空间插件。 但是由于某些版本不匹配,我无法 运行 我的项目..

工件 org.neo4j:neo4j-spatial 的较新版本(自 2014 年起)在 neo4j-contrib Maven 存储库中可用。此存储库位于 https://raw.github.com/neo4j-contrib/m2/master/releases.

按照 here 的说明,您必须将此存储库添加到您的 pom.xml:

<repositories>
    <repository>
        <id>neo4j-contrib-releases</id>
        <url>https://raw.github.com/neo4j-contrib/m2/master/releases</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
    <repository>
        <id>neo4j-contrib-snapshots</id>
        <url>https://raw.github.com/neo4j-contrib/m2/master/snapshots</url>
        <releases>
            <enabled>false</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>

但是,此版本存储库中今天可用的最新版本是

<dependency>
  <groupId>org.neo4j</groupId>
  <artifactId>neo4j-spatial</artifactId>
  <version>0.25.5-neo4j-3.3.5</version> 
</dependency>

截至今天,版本 0.25.5-neo4j-3.4.0master branch in the git repo but it looks like it has not yet been released to the Maven repository. The best option would be the use the 3.3.5 version mentioned above, but if the 3.4.0 version is absoluetly required, you could either wait for a few more days and hope it becomes available in the Maven repository or you could try to build the version yourself following these instructions 的版本。