spring-data-neo4j 工件在获取资源时会导致对 tinkerpop 域的访问被拒绝警告。
我的 pom.xml 文件具有以下相关依赖项:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-cypher</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
<version>2.0.2.RELEASE</version>
</dependency>
运行 maven 时,我收到以下错误(仅提供前几行):
Downloading: http://maven.springframework.org/milestone/org/springframework/data/spring-data-neo4j/2.0.2.RELEASE/spring-data-neo4j-2.0.2.RELEASE.pom
Downloading: http://go-build.local/nexus/content/groups/public/org/springframework/data/spring-data-neo4j/2.0.2.RELEASE/spring-data-neo4j-2.0.2.RELEASE.pom
Downloaded: http://go-build.local/nexus/content/groups/public/org/springframework/data/spring-data-neo4j/2.0.2.RELEASE/spring-data-neo4j-2.0.2.RELEASE.pom (8 KB at 17.5 KB/sec)
Downloading: http://maven.springframework.org/milestone/org/springframework/data/spring-data-neo4j-parent/2.0.2.RELEASE/spring-data-neo4j-parent-2.0.2.RELEASE.pom
Downloading: http://go-build.local/nexus/content/groups/public/org/springframework/data/spring-data-neo4j-parent/2.0.2.RELEASE/spring-data-neo4j-parent-2.0.2.RELEASE.pom
Downloaded: http://go-build.local/nexus/content/groups/public/org/springframework/data/spring-data-neo4j-parent/2.0.2.RELEASE/spring-data-neo4j-parent-2.0.2.RELEASE.pom (27 KB at 42.2 KB/sec)
Downloading: http://tinkerpop.com/maven2/org/springframework/spring-beans/maven-metadata.xml
[WARNING] Could not transfer metadata org.springframework:spring-beans/maven-metadata.xml from/to tinkerpop-repository (http://tinkerpop.com/maven2): Access denied to: http://tinkerpop.com/maven2/org/springframework/spring-beans/maven-metadata.xml
Downloading: http://tinkerpop.com/maven2/org/springframework/spring-beans/3.0.8.BUILD-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.springframework:spring-beans:3.0.8.BUILD-SNAPSHOT/maven-metadata.xml from/to tinkerpop-repository (http://tinkerpop.com/maven2): Access denied to: http://tinkerpop.com/maven2/org/springframework/spring-beans/3.0.8.BUILD-SNAPSHOT/maven-metadata.xml
Downloading: http://tinkerpop.com/maven2/org/springframework/spring-parent/3.0.8.BUILD-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.springframework:spring-parent:3.0.8.BUILD-SNAPSHOT/maven-metadata.xml from/to tinkerpop-repository (http://tinkerpop.com/maven2): Access denied to: http://tinkerpop.com/maven2/org/springframework/spring-parent/3.0.8.BUILD-SNAPSHOT/maven-metadata.xml
Downloading: http://tinkerpop.com/maven2/org/springframework/spring-core/3.0.8.BUILD-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.springframework:spring-core:3.0.8.BUILD-SNAPSHOT/maven-metadata.xml from/to tinkerpop-repository (http://tinkerpop.com/maven2): Access denied to: http://tinkerpop.com/maven2/org/springframework/spring-core/3.0.8.BUILD-SNAPSHOT/maven-metadata.xml
Downloading: http://tinkerpop.com/maven2/org/springframework/spring-asm/3.0.8.BUILD-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.springframework:spring-asm:3.0.8.BUILD-SNAPSHOT/maven-metadata.xml from/to tinkerpop-repository (http://tinkerpop.com/maven2): Access denied to: http://tinkerpop.com/maven2/org/springframework/spring-asm/3.0.8.BUILD-SNAPSHOT/maven-metadata.xml
Downloading: http://tinkerpop.com/maven2/org/springframework/spring-beans/3.1.0-SPR7420.BUILD-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.springframework:spring-beans:3.1.0-SPR7420.BUILD-SNAPSHOT/maven-metadata.xml from/to tinkerpop-repository (http://tinkerpop.com/maven2): Access denied to: http://tinkerpop.com/maven2/org/springframework/spring-beans/3.1.0-SPR7420.BUILD-SNAPSHOT/maven-metadata.xml
Downloading: http://tinkerpop.com/maven2/org/springframework/spring-parent/3.1.0-SPR7420.BUILD-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.springframework:spring-parent:3.1.0-SPR7420.BUILD-SNAPSHOT/maven-metadata.xml from/to tinkerpop-repository (http://tinkerpop.com/maven2): Access denied to: http://tinkerpop.com/maven2/org/springframework/spring-parent/3.1.0-SPR7420.BUILD-SNAPSHOT/maven-metadata.xml
Downloading: http://tinkerpop.com/maven2/org/springframework/spring-core/3.1.0-SPR7420.BUILD-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.springframework:spring-core:3.1.0-SPR7420.BUILD-SNAPSHOT/maven-metadata.xml from/to tinkerpop-repository (http://tinkerpop.com/maven2): Access denied to: http://tinkerpop.com/maven2/org/springframework/spring-core/3.1.0-SPR7420.BUILD-SNAPSHOT/maven-metadata.xml
Downloading: http://tinkerpop.com/maven2/org/springframework/spring-asm/3.1.0-SPR7420.BUILD-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.springframework:spring-asm:3.1.0-SPR7420.BUILD-SNAPSHOT/maven-metadata.xml from/to tinkerpop-repository (http://tinkerpop.com/maven2): Access denied to: http://tinkerpop.com/maven2/org/springframework/spring-asm/3.1.0-SPR7420.BUILD-SNAPSHOT/maven-metadata.xml
Downloading: http://tinkerpop.com/maven2/org/springframework/spring-beans/3.1.0.BUILD-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.springframework:spring-beans:3.1.0.BUILD-SNAPSHOT/maven-metadata.xml from/to tinkerpop-repository (http://tinkerpop.com/maven2): Access denied to: http://tinkerpop.com/maven2/org/springframework/spring-beans/3.1.0.BUILD-SNAPSHOT/maven-metadata.xml
Downloading: http://tinkerpop.com/maven2/org/springframework/spring-parent/3.1.0.BUILD-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.springframework:spring-parent:3.1.0.BUILD-SNAPSHOT/maven-metadata.xml from/to tinkerpop-repository (http://tinkerpop.com/maven2): Access denied to: http://tinkerpop.com/maven2/org/springframework/spring-parent/3.1.0.BUILD-SNAPSHOT/maven-metadata.xml
Downloading: http://tinkerpop.com/maven2/org/springframework/spring-core/3.1.0.BUILD-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.springframework:spring-core:3.1.0.BUILD-SNAPSHOT/maven-metadata.xml from/to tinkerpop-repository (http://tinkerpop.com/maven2): Access denied to: http://tinkerpop.com/maven2/org/springframework/spring-core/3.1.0.BUILD-SNAPSHOT/maven-metadata.xml
Downloading: http://tinkerpop.com/maven2/org/springframework/spring-asm/3.1.0.BUILD-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.springframework:spring-asm:3.1.0.BUILD-SNAPSHOT/maven-metadata.xml from/to tinkerpop-repository (http://tinkerpop.com/maven2): Access denied to: http://tinkerpop.com/maven2/org/springframework/spring-asm/3.1.0.BUILD-SNAPSHOT/maven-metadata.xml
Downloading: http://tinkerpop.com/maven2/org/springframework/spring-beans/3.1.1.BUILD-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.springframework:spring-beans:3.1.1.BUILD-SNAPSHOT/maven-metadata.xml from/to tinkerpop-repository (http://tinkerpop.com/maven2): Access denied to: http://tinkerpop.com/maven2/org/springframework/spring-beans/3.1.1.BUILD-SNAPSHOT/maven-metadata.xml
等等等等
我尝试了几件事,但运气不佳,例如:
- 将 spring-data-neo4j pom 中列出的 3 个 tinkerpop 项目的排除项添加到依赖项
- 添加请求的 spring 库的依赖项(例如 spring-beans、spring-tx 等)
- 为 springframework.org 添加存储库
在我的任何 pom 文件或 maven 设置中都没有引用任何 repo(包括 tinkerpop),除非我尝试直接包含对 neo4j 或 springsource 的 repos 的引用以尝试调试此问题。
下面是 pom.xml 和 settings.xml 文件的精简版本,它们仍然表现出相同的行为:
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.test</groupId>
<artifactId>example</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
<version>2.0.2.RELEASE</version>
</dependency>
</dependencies>
</project>
设置.xml
<settings>
<localRepository>/Users/ian/.m2/repository</localRepository>
</settings>