From bc27a8aa6e167618bf5064a620b08beeabe549e9 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 22 Apr 2015 17:29:22 +0100 Subject: [PATCH] Show different Gradle repository config for snapshots vs releases Closes gh-2838 --- .../src/main/asciidoc/using-spring-boot.adoc | 33 +++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc b/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc index ff82fa391d7..f42fc694dc2 100644 --- a/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc +++ b/spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc @@ -147,7 +147,16 @@ Maven, there is no "`super parent`" to import to share some configuration. ---- apply plugin: 'java' - repositories { jcenter() } + repositories { +ifeval::["{spring-boot-repo}" != "release"] + maven { url "http://repo.spring.io/snapshot" } + maven { url "http://repo.spring.io/milestone" } +endif::[] +ifeval::["{spring-boot-repo}" == "release"] + jcenter() +endif::[] + } + dependencies { compile("org.springframework.boot:spring-boot-starter-web:{spring-boot-version}") } @@ -162,7 +171,16 @@ for "`blessed`" dependencies>>: [source,groovy,indent=0,subs="attributes"] ---- buildscript { - repositories { jcenter() } + repositories { +ifeval::["{spring-boot-repo}" != "release"] + maven { url "http://repo.spring.io/snapshot" } + maven { url "http://repo.spring.io/milestone" } +endif::[] +ifeval::["{spring-boot-repo}" == "release"] + jcenter() +endif::[] + } + dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:{spring-boot-version}") } @@ -171,7 +189,16 @@ for "`blessed`" dependencies>>: apply plugin: 'java' apply plugin: 'spring-boot' - repositories { jcenter() } + repositories { +ifeval::["{spring-boot-repo}" != "release"] + maven { url "http://repo.spring.io/snapshot" } + maven { url "http://repo.spring.io/milestone" } +endif::[] +ifeval::["{spring-boot-repo}" == "release"] + jcenter() +endif::[] + } + dependencies { compile("org.springframework.boot:spring-boot-starter-web") testCompile("org.springframework.boot:spring-boot-starter-test")