Skip to content

Commit f70d6fb

Browse files
author
Phillip Webb
committed
Declare all repositories in build samples
Update Gradle and Ant samples to consistently declare all repositories (local, central, release, snapshot, milestone). Fixes gh-426
1 parent 39f10fd commit f70d6fb

File tree

6 files changed

+65
-35
lines changed

6 files changed

+65
-35
lines changed

spring-boot-samples/spring-boot-sample-actuator/build.gradle

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ buildscript {
33
springBootVersion = '1.0.0.BUILD-SNAPSHOT'
44
}
55
repositories {
6+
// NOTE: You should declare only repositories that you need here
67
mavenLocal()
7-
maven { url "http://repo.spring.io/libs-snapshot" }
8+
mavenCentral()
9+
maven { url "http://repo.spring.io/release" }
10+
maven { url "http://repo.spring.io/milestone" }
11+
maven { url "http://repo.spring.io/snapshot" }
812
}
913
dependencies {
1014
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
@@ -22,9 +26,12 @@ jar {
2226
}
2327

2428
repositories {
29+
// NOTE: You should declare only repositories that you need here
2530
mavenLocal()
2631
mavenCentral()
27-
maven { url "http://repo.spring.io/libs-snapshot" }
32+
maven { url "http://repo.spring.io/release" }
33+
maven { url "http://repo.spring.io/milestone" }
34+
maven { url "http://repo.spring.io/snapshot" }
2835
}
2936

3037
dependencies {
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<ivy-module version="2.0">
2-
<info organisation="org.springframework.boot" module="spring-boot-sample-actuator"/>
3-
<configurations>
4-
<conf name="loader" description="helpers added to final jar" />
5-
<conf name="compile" description="everything needed to compile this module" />
6-
<conf name="runtime" extends="compile" description="everything needed to run this module" />
7-
</configurations>
8-
<dependencies>
9-
<dependency org="org.springframework.boot" name="spring-boot-loader" rev="1.0.0.BUILD-SNAPSHOT" conf="loader->default"/>
10-
<dependency org="org.springframework.boot" name="spring-boot-starter-web" rev="1.0.0.BUILD-SNAPSHOT" conf="compile"/>
11-
<dependency org="org.springframework.boot" name="spring-boot-starter-actuator" rev="1.0.0.BUILD-SNAPSHOT" conf="runtime"/>
12-
</dependencies>
13-
</ivy-module>
2+
<info organisation="org.springframework.boot" module="spring-boot-sample-actuator" />
3+
<configurations>
4+
<conf name="loader" description="helpers added to final jar" />
5+
<conf name="compile" description="everything needed to compile this module" />
6+
<conf name="runtime" extends="compile" description="everything needed to run this module" />
7+
</configurations>
8+
<dependencies>
9+
<dependency org="org.springframework.boot" name="spring-boot-loader" rev="1.0.0.BUILD-SNAPSHOT" conf="loader->default" />
10+
<dependency org="org.springframework.boot" name="spring-boot-starter-web" rev="1.0.0.BUILD-SNAPSHOT" conf="compile" />
11+
<dependency org="org.springframework.boot" name="spring-boot-starter-actuator" rev="1.0.0.BUILD-SNAPSHOT" conf="runtime" />
12+
</dependencies>
13+
</ivy-module>
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<ivysettings>
2-
<settings defaultResolver="chain"/>
3-
<resolvers>
4-
<chain name="chain">
5-
<filesystem name="local" local="true" m2compatible="true">
6-
<artifact
7-
pattern="${user.home}/.m2/[organisation]/[module]/[revision]/[module]-[revision].[ext]" />
8-
<ivy
9-
pattern="${user.home}/.m2/[organisation]/[module]/[revision]/[module]-[revision].pom" />
10-
</filesystem>
11-
<ibiblio name="ibiblio" m2compatible="true" />
12-
<ibiblio name="spring-milestones" m2compatible="true" root="http://repo.spring.io/libs-milestone"/>
13-
<ibiblio name="spring-snapshots" m2compatible="true" root="http://repo.spring.io/libs-snapshot"/>
14-
</chain>
15-
</resolvers>
16-
</ivysettings>
2+
<settings defaultResolver="chain" />
3+
<resolvers>
4+
<chain name="chain">
5+
<!-- NOTE: You should declare only repositories that you need here -->
6+
<filesystem name="local" local="true" m2compatible="true">
7+
<artifact pattern="${user.home}/.m2/[organisation]/[module]/[revision]/[module]-[revision].[ext]" />
8+
<ivy pattern="${user.home}/.m2/[organisation]/[module]/[revision]/[module]-[revision].pom" />
9+
</filesystem>
10+
<ibiblio name="ibiblio" m2compatible="true" />
11+
<ibiblio name="spring-milestones" m2compatible="true" root="http://repo.spring.io/release" />
12+
<ibiblio name="spring-milestones" m2compatible="true" root="http://repo.spring.io/milestone" />
13+
<ibiblio name="spring-snapshots" m2compatible="true" root="http://repo.spring.io/snapshot" />
14+
</chain>
15+
</resolvers>
16+
</ivysettings>

spring-boot-samples/spring-boot-sample-simple/build.gradle

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ buildscript {
33
springBootVersion = '1.0.0.BUILD-SNAPSHOT'
44
}
55
repositories {
6+
// NOTE: You should declare only repositories that you need here
67
mavenLocal()
7-
maven { url "http://repo.spring.io/libs-snapshot" }
8+
mavenCentral()
9+
maven { url "http://repo.spring.io/release" }
10+
maven { url "http://repo.spring.io/milestone" }
11+
maven { url "http://repo.spring.io/snapshot" }
812
}
913
dependencies {
1014
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
@@ -22,9 +26,12 @@ jar {
2226
}
2327

2428
repositories {
29+
// NOTE: You should declare only repositories that you need here
2530
mavenLocal()
2631
mavenCentral()
27-
maven { url "http://repo.spring.io/libs-snapshot" }
32+
maven { url "http://repo.spring.io/release" }
33+
maven { url "http://repo.spring.io/milestone" }
34+
maven { url "http://repo.spring.io/snapshot" }
2835
}
2936

3037
dependencies {

spring-boot-samples/spring-boot-sample-web-static/build.gradle

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ buildscript {
33
springBootVersion = '1.0.0.BUILD-SNAPSHOT'
44
}
55
repositories {
6+
// NOTE: You should declare only repositories that you need here
67
mavenLocal()
7-
maven { url "http://repo.spring.io/libs-snapshot" }
8+
mavenCentral()
9+
maven { url "http://repo.spring.io/release" }
10+
maven { url "http://repo.spring.io/milestone" }
11+
maven { url "http://repo.spring.io/snapshot" }
812
}
913
dependencies {
1014
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
@@ -26,8 +30,12 @@ war {
2630
}
2731

2832
repositories {
33+
// NOTE: You should declare only repositories that you need here
34+
mavenLocal()
2935
mavenCentral()
30-
maven { url "http://repo.spring.io/libs-snapshot" }
36+
maven { url "http://repo.spring.io/release" }
37+
maven { url "http://repo.spring.io/milestone" }
38+
maven { url "http://repo.spring.io/snapshot" }
3139
}
3240

3341
configurations {

spring-boot-samples/spring-boot-sample-web-ui/build.gradle

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ buildscript {
44
springLoadedVersion = '1.1.5.RELEASE'
55
}
66
repositories {
7+
// NOTE: You should declare only repositories that you need here
78
mavenLocal()
8-
maven { url "http://repo.spring.io/libs-snapshot" }
9+
mavenCentral()
10+
maven { url "http://repo.spring.io/release" }
11+
maven { url "http://repo.spring.io/milestone" }
12+
maven { url "http://repo.spring.io/snapshot" }
913
}
1014
dependencies {
1115
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
@@ -27,8 +31,12 @@ jar {
2731
}
2832

2933
repositories {
34+
// NOTE: You should declare only repositories that you need here
35+
mavenLocal()
3036
mavenCentral()
31-
maven { url "http://repo.spring.io/libs-snapshot" }
37+
maven { url "http://repo.spring.io/release" }
38+
maven { url "http://repo.spring.io/milestone" }
39+
maven { url "http://repo.spring.io/snapshot" }
3240
}
3341

3442
dependencies {

0 commit comments

Comments
 (0)