From 2876930ebc9b85115a4e8d108293db5181a1f9b3 Mon Sep 17 00:00:00 2001 From: Mahmoud Ben Hassine Date: Tue, 30 Oct 2018 14:09:21 +0100 Subject: [PATCH] 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. --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index cb0d07b12..8197e45fc 100644 --- a/build.gradle +++ b/build.gradle @@ -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() }