From a2b0b70b556f7536ba237948ca1c5a06ca60d574 Mon Sep 17 00:00:00 2001 From: sampengilly Date: Mon, 16 Mar 2015 21:05:52 +1000 Subject: [PATCH] Added additional Gradle tip to Eureka Server documentation. Tip covers the usage of the spring dependency management plugin in order to prevent fatal crashes during application startup. --- .../main/asciidoc/spring-cloud-netflix.adoc | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/src/main/asciidoc/spring-cloud-netflix.adoc b/docs/src/main/asciidoc/spring-cloud-netflix.adoc index 2aa160c88..ed31b2bdb 100644 --- a/docs/src/main/asciidoc/spring-cloud-netflix.adoc +++ b/docs/src/main/asciidoc/spring-cloud-netflix.adoc @@ -248,6 +248,29 @@ springBoot { ---- ==== +[TIP] +==== +Due to Gradle's dependency resolution rules and the lack of a parent bom feature, simply depending on spring-cloud-starter-eureka-server can cause failures on application startup. To remedy this the Spring dependency management plugin must be added and the Spring cloud starter parent bom must be imported like so: + +.build.gradle +[source,java,indent=0] +---- +buildscript { + dependencies { + classpath "io.spring.gradle:dependency-management-plugin:0.4.0.RELEASE" + } +} + +apply plugin: "io.spring.dependency-management" + +dependencyManagement { + imports { + mavenBom 'org.springframework.cloud:spring-cloud-starter-parent:1.0.0.RELEASE' + } +} +---- +==== + === High Availability, Zones and Regions The Eureka server does not have a backend store, but the service