Fix build by resolving neo4j-cypher-dsl artifact from neo4j's repository first

Before this commit, the build failed with:

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':spring-batch-infrastructure:compileClasspath'.
> Could not find neo4j-cypher-dsl.jar (org.neo4j:neo4j-cypher-dsl:2.0.1).
  Searched in the following locations:
      https://repo.spring.io/libs-milestone/org/neo4j/neo4j-cypher-dsl/2.0.1/neo4j-cypher-dsl-2.0.1.jar

From the error message it looks like neo4j dependencies are first
resolved from "https://repo.spring.io/libs-milestone" where version
2.0.1 of neo4j-cypher-dsl does not exist (it stops at 1.7). It should be
noted that:

* this version is also missing from maven central which also stops at v1.7
* this version exists in neo4j's repository

So either this artifact has been removed from maven central and pivotal's
libs-milestone, or neo4j is not syncing this artifact with maven central
after version 1.7 anymore.

This commit resolves the issue by first looking for the artifact in
neo4j's repository first. Note there should be no side effects on resolving
dependencies as the neo4j's repository we are pointing to contains only
neo4j's artifacts.
This commit is contained in:
Mahmoud Ben Hassine
2018-10-30 14:09:21 +01:00
parent c075ffcbfc
commit 2876930ebc

View File

@@ -30,11 +30,11 @@ allprojects {
group = 'org.springframework.batch'
repositories {
maven { url 'https://m2.neo4j.org/content/repositories/releases'}
maven { url 'https://repo.spring.io/libs-milestone' }
maven { url 'https://repo.spring.io/plugins-release' }
maven { url "https://repo.spring.io/libs-snapshot" }
maven { url 'https://m2.neo4j.org/content/repositories/releases'}
mavenCentral()
}