or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

index.md

index.mddocs/

0

# Spring Cloud Starter Parent

1

2

Spring Cloud Starter Parent is a Maven parent POM that provides dependency management and build configuration for Spring Cloud applications. It extends Spring Boot's starter parent and provides centralized dependency management for the Spring Cloud ecosystem through the spring-cloud-dependencies BOM.

3

4

## Package Information

5

6

- **Package Name**: spring-cloud-starter-parent

7

- **Package Type**: maven

8

- **Language**: Java

9

- **Installation**: Add as parent POM in your project's `pom.xml`

10

11

## Core Usage

12

13

To use Spring Cloud Starter Parent as your project's parent POM:

14

15

```xml

16

<parent>

17

<groupId>org.springframework.cloud</groupId>

18

<artifactId>spring-cloud-starter-parent</artifactId>

19

<version>2024.0.1</version>

20

<relativePath/>

21

</parent>

22

```

23

24

This provides:

25

- Spring Boot parent configuration (version 3.4.3)

26

- Spring Cloud dependencies version management (2024.0.1)

27

- Spring repository configurations

28

- Distribution management settings

29

30

## Basic Usage

31

32

```xml

33

<?xml version="1.0" encoding="UTF-8"?>

34

<project xmlns="http://maven.apache.org/POM/4.0.0"

35

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

36

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0

37

https://maven.apache.org/xsd/maven-4.0.0.xsd">

38

<modelVersion>4.0.0</modelVersion>

39

40

<parent>

41

<groupId>org.springframework.cloud</groupId>

42

<artifactId>spring-cloud-starter-parent</artifactId>

43

<version>2024.0.1</version>

44

<relativePath/>

45

</parent>

46

47

<groupId>com.example</groupId>

48

<artifactId>my-spring-cloud-app</artifactId>

49

<version>1.0.0</version>

50

<name>My Spring Cloud Application</name>

51

52

<dependencies>

53

<!-- Spring Cloud dependencies inherit managed versions -->

54

<dependency>

55

<groupId>org.springframework.cloud</groupId>

56

<artifactId>spring-cloud-starter-gateway</artifactId>

57

</dependency>

58

<dependency>

59

<groupId>org.springframework.cloud</groupId>

60

<artifactId>spring-cloud-starter-config</artifactId>

61

</dependency>

62

</dependencies>

63

</project>

64

```

65

66

## Architecture

67

68

Spring Cloud Starter Parent is built around Maven's inheritance mechanism and provides:

69

70

- **Parent Inheritance**: Extends `org.springframework.boot:spring-boot-starter-parent:3.4.3`

71

- **Dependency Management**: Imports `spring-cloud-dependencies` BOM for version management

72

- **Repository Configuration**: Provides access to Spring repositories via profiles

73

- **Distribution Management**: Configured for Spring artifact publishing

74

- **Build Profiles**: Multiple environments (spring, milestone, bintray, central)

75

76

## Capabilities

77

78

### Maven Parent Inheritance

79

80

Provides the foundation POM configuration that child projects inherit.

81

82

```xml { .api }

83

<parent>

84

<groupId>org.springframework.cloud</groupId>

85

<artifactId>spring-cloud-starter-parent</artifactId>

86

<version>2024.0.1</version>

87

<relativePath/>

88

</parent>

89

```

90

91

**Inherited Configuration:**

92

- Spring Boot parent configuration (3.4.3)

93

- Maven plugin management

94

- Java build settings

95

- Spring Boot dependency management

96

97

### Dependency Management

98

99

Manages versions for all Spring Cloud dependencies through BOM import.

100

101

```xml { .api }

102

<dependencyManagement>

103

<dependencies>

104

<dependency>

105

<groupId>org.springframework.cloud</groupId>

106

<artifactId>spring-cloud-dependencies</artifactId>

107

<version>2024.0.1</version>

108

<type>pom</type>

109

<scope>import</scope>

110

</dependency>

111

</dependencies>

112

</dependencyManagement>

113

```

114

115

**Managed Spring Cloud Modules:**

116

- spring-cloud-commons-dependencies (4.2.1)

117

- spring-cloud-netflix-dependencies (4.2.1)

118

- spring-cloud-stream-dependencies (4.2.1)

119

- spring-cloud-task-dependencies (3.2.1)

120

- spring-cloud-circuitbreaker-dependencies (3.2.1)

121

- spring-cloud-config-dependencies (4.2.1)

122

- spring-cloud-function-dependencies (4.2.2)

123

- spring-cloud-gateway-dependencies (4.2.1)

124

- spring-cloud-consul-dependencies (4.2.1)

125

- spring-cloud-vault-dependencies (4.2.1)

126

- spring-cloud-zookeeper-dependencies (4.2.1)

127

- spring-cloud-bus-dependencies (4.2.1)

128

- spring-cloud-contract-dependencies (4.2.1)

129

- spring-cloud-openfeign-dependencies (4.2.1)

130

- spring-cloud-kubernetes-dependencies (3.2.1)

131

132

### Maven Properties

133

134

Configurable build properties for child projects.

135

136

```xml { .api }

137

<properties>

138

<main.basedir>${basedir}/../..</main.basedir>

139

<spring-cloud.version>2024.0.1</spring-cloud.version>

140

</properties>

141

```

142

143

**Available Properties:**

144

- `main.basedir`: Base directory reference for multi-module builds

145

- `spring-cloud.version`: Spring Cloud version for dependency management

146

147

### Repository Configuration

148

149

Spring repositories profile providing access to Spring artifact repositories.

150

151

```xml { .api }

152

<profile>

153

<id>spring</id>

154

<repositories>

155

<repository>

156

<id>spring-snapshots</id>

157

<name>Spring Snapshots</name>

158

<url>https://repo.spring.io/libs-snapshot-local</url>

159

<snapshots>

160

<enabled>true</enabled>

161

</snapshots>

162

</repository>

163

<repository>

164

<id>spring-milestones</id>

165

<name>Spring Milestones</name>

166

<url>https://repo.spring.io/libs-milestone-local</url>

167

<snapshots>

168

<enabled>false</enabled>

169

</snapshots>

170

</repository>

171

<repository>

172

<id>spring-releases</id>

173

<name>Spring Releases</name>

174

<url>https://repo.spring.io/release</url>

175

<snapshots>

176

<enabled>false</enabled>

177

</snapshots>

178

</repository>

179

</repositories>

180

<pluginRepositories>

181

<pluginRepository>

182

<id>spring-snapshots</id>

183

<name>Spring Snapshots</name>

184

<url>https://repo.spring.io/libs-snapshot-local</url>

185

<snapshots>

186

<enabled>true</enabled>

187

</snapshots>

188

</pluginRepository>

189

<pluginRepository>

190

<id>spring-milestones</id>

191

<name>Spring Milestones</name>

192

<url>https://repo.spring.io/libs-milestone-local</url>

193

<snapshots>

194

<enabled>false</enabled>

195

</snapshots>

196

</pluginRepository>

197

</pluginRepositories>

198

</profile>

199

```

200

201

**Usage:**

202

```bash

203

mvn clean install -Pspring

204

```

205

206

### Distribution Management

207

208

Artifact publishing configuration for Spring repositories.

209

210

```xml { .api }

211

<distributionManagement>

212

<downloadUrl>https://github.com/spring-cloud</downloadUrl>

213

<site>

214

<id>spring-docs</id>

215

<url>scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-cloud/docs/${project.artifactId}/${project.version}</url>

216

</site>

217

<repository>

218

<id>repo.spring.io</id>

219

<name>Spring Release Repository</name>

220

<url>https://repo.spring.io/libs-release-local</url>

221

</repository>

222

<snapshotRepository>

223

<id>repo.spring.io</id>

224

<name>Spring Snapshot Repository</name>

225

<url>https://repo.spring.io/libs-snapshot-local</url>

226

</snapshotRepository>

227

</distributionManagement>

228

```

229

230

### Build Profiles

231

232

Additional build profiles for different publishing environments.

233

234

**Milestone Profile:**

235

```xml { .api }

236

<profile>

237

<id>milestone</id>

238

<distributionManagement>

239

<repository>

240

<id>repo.spring.io</id>

241

<name>Spring Milestone Repository</name>

242

<url>https://repo.spring.io/libs-milestone-local</url>

243

</repository>

244

</distributionManagement>

245

</profile>

246

```

247

248

**Bintray Profile:**

249

```xml { .api }

250

<profile>

251

<id>bintray</id>

252

<distributionManagement>

253

<repository>

254

<id>bintray</id>

255

<name>Jcenter Repository</name>

256

<url>https://api.bintray.com/maven/spring/jars/org.springframework.cloud:${bintray.package}</url>

257

</repository>

258

</distributionManagement>

259

</profile>

260

```

261

262

**Central Profile (Maven Central):**

263

```xml { .api }

264

<profile>

265

<id>central</id>

266

<build>

267

<plugins>

268

<plugin>

269

<groupId>org.apache.maven.plugins</groupId>

270

<artifactId>maven-gpg-plugin</artifactId>

271

<executions>

272

<execution>

273

<id>sign-artifacts</id>

274

<phase>verify</phase>

275

<goals>

276

<goal>sign</goal>

277

</goals>

278

</execution>

279

</executions>

280

</plugin>

281

</plugins>

282

</build>

283

<distributionManagement>

284

<snapshotRepository>

285

<id>sonatype-nexus-snapshots</id>

286

<name>Sonatype Nexus Snapshots</name>

287

<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>

288

</snapshotRepository>

289

<repository>

290

<id>sonatype-nexus-staging</id>

291

<name>Nexus Release Repository</name>

292

<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>

293

</repository>

294

</distributionManagement>

295

</profile>

296

```

297

298

**Usage Examples:**

299

```bash

300

# Use milestone profile for milestone releases

301

mvn deploy -Pmilestone

302

303

# Use central profile for Maven Central releases

304

mvn deploy -Pcentral

305

306

# Use bintray profile for Bintray/JCenter publishing

307

mvn deploy -Pbintray

308

309

# Use spring profile for Spring repository access

310

mvn install -Pspring

311

```

312

313

## Project Metadata

314

315

```xml { .api }

316

<groupId>org.springframework.cloud</groupId>

317

<artifactId>spring-cloud-starter-parent</artifactId>

318

<version>2024.0.1</version>

319

<name>spring-cloud-starter-parent</name>

320

<description>Spring Cloud Starter Parent</description>

321

<packaging>pom</packaging>

322

<url>https://projects.spring.io/spring-cloud</url>

323

<organization>

324

<name>Pivotal Software, Inc.</name>

325

<url>https://www.spring.io</url>

326

</organization>

327

```