I'm trying to "upgrade" my appplicaition from using an embedded neo4j database to use a server based setup.
I'm using spring as the framework for setting up easy repositories and it works like a charm.
Now I'm trying to include a dependency for org.springframework.data:spring-data-neo4j so I will be able to connect to a neo4j server. But it fails for both gradle and maven, and for different versions of spring data neo4j rest. And with a new-to-me exception of 401 Unauthorized when getting the pom:
* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
> Could not resolve org.neo4j:neo4j-rest-graphdb:1.9.
Required by:
:recipeCrawlers:unspecified > org.springframework.data:spring-data-neo4j-rest:2.4.0.BUILD-SNAPSHOT
> Could not HEAD 'http://repo.spring.io/libs-snapshot/org/neo4j/neo4j-rest-graphdb/1.9/neo4j-rest-graphdb-1.9.pom'. Received status code 401 from server: Unauthorized
Anybody have an idea of what I'm am doing wrong
part of my build.gradle is:
buildscript {
repositories {
maven { url 'http://m2.neo4j.org/content' }
maven { url "http://repo.spring.io/libs-snapshot" }
mavenLocal()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:0.5.0.M5")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
jar {
baseName = 'crawlers'
version = '0.1.0'
}
repositories {
mavenCentral()
maven { url "http://repo.spring.io/libs-snapshot" }
}
dependencies {
compile("org.springframework.boot:spring-boot-starter:0.5.0.M5")
compile("org.springframework.data:spring-data-mongodb:1.3.2.RELEASE")
compile("com.google.guava:guava-collections:r03")
compile("org.apache.commons:commons-lang3:3.0")
compile 'org.springframework.data:spring-data-neo4j:2.4.0.BUILD-SNAPSHOT'
compile 'org.springframework.data:spring-data-neo4j-rest:2.4.0.BUILD-SNAPSHOT'
// compile 'org.neo4j:neo4j-rest-graphdb:1.9'
compile 'javax.validation:validation-api:1.1.0.Final'
compile 'org.hibernate:hibernate-validator:5.0.1.Final'
// compile 'org.neo4j:neo4j-cypher:'
testCompile("junit:junit:4.11")
}
task wrapper(type: Wrapper) {
gradleVersion = '1.8'
}
Using maven with the same dependencies, I get this error:
Could not resolve dependencies for project com.emaat-sample:jar:0.0.1-SNAPSHOT: Failed to collect dependencies for [org.springframework.boot:spring-boot-starter:jar:0.5.0.M5 (compile), org.springframework.data:spring-data-neo4j:jar:2.4.0.BUILD-SNAPSHOT (compile), org.springframework.data:spring-data-neo4j-rest:jar:2.4.0.BUILD-SNAPSHOT (compile), junit:junit:jar:4.11 (test), org.mockito:mockito-core:jar:1.9.5 (test), org.hamcrest:hamcrest-library:jar:1.3 (test)]: Failed to read artifact descriptor for org.neo4j:neo4j-rest-graphdb:jar:1.9: Could not transfer artifact org.neo4j:neo4j-rest-graphdb:pom:1.9 from/to spring-snapshots (http://repo.spring.io/libs-snapshot): Not authorized, ReasonPhrase:Unauthorized. -> [Help 1]
My pom file: http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 com.emaat sample 0.0.1-SNAPSHOT sample
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>0.5.0.M5</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
<version>2.4.0.BUILD-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j-rest</artifactId>
<version>2.4.0.BUILD-SNAPSHOT</version>
</dependency>
</dependencies>
<!-- Package as an executable JAR -->
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-snapshots</id>
<url>http://repo.spring.io/libs-snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<url>http://repo.spring.io/libs-snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>