# Gradle Spring Boot plugin

**URL:** <https://discuss.gradle.org/t/gradle-spring-boot-plugin/26407>\
**Category:** Help/Discuss\
**Created:** [March 27, 2018, 6:25am UTC](https://discuss.gradle.org/t/gradle-spring-boot-plugin/26407 "2018-03-27T06:25:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Strannik](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@Strannik](https://discuss.gradle.org/u/Strannik)\
**Post date:** [March 27, 2018, 6:25am UTC](https://discuss.gradle.org/t/gradle-spring-boot-plugin/26407/1 "2018-03-27T06:25:25Z")

</div>

Hi

I generated and downloaded sample Spring boot application from [http://start.spring.io/](http://start.spring.io/) and it worked fine. However I couldn’t understand which plugin is responsible for pure dependency management.

All I want is to automatically resolve dependency versions. So I tried this build. gradle:

```
plugins {
  id "io.spring.dependency-management" version "1.0.4.RELEASE"
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'io.spring.dependency-management'

group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8

repositories {
	mavenCentral()
}

dependencies {
	compile('org.springframework.boot:spring-boot-starter-web')
	testCompile('org.springframework.boot:spring-boot-starter-test')
}

```

However I’ve got exception:

```
* What went wrong:
Could not resolve all files for configuration ':compileClasspath'.
> Could not find org.springframework.boot:spring-boot-starter-web:.
  Required by:
      project :

```

So is it possible to get automatic dependency managemen without Spring Boot plugin?

Thanks

---

<div class="post-metadata">

**Author:** ![jjustinic](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/jjustinic/32/9005_2.png) [@jjustinic](https://discuss.gradle.org/u/jjustinic)\
**Post date:** [March 28, 2018, 4:56am UTC](https://discuss.gradle.org/t/gradle-spring-boot-plugin/26407/2 "2018-03-28T04:56:09Z")

</div>

You don’t need the Spring Boot plugin, but the dependency versions have to come from somewhere. Your options with the Spring Dependency Management plugin are to declare them in the `dependencyManagement {...}` block explicitly or import a BOM. Importing a BOM is closer to “automatic” as you only need to specify the version of the BOM. The Spring Boot plugin adds a Spring Boot BOM, but without that plugin, you can add any BOM that you want.

---

<div class="post-metadata">

**Author:** ![Strannik](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@Strannik](https://discuss.gradle.org/u/Strannik)\
**Post date:** [March 28, 2018, 6:08am UTC](https://discuss.gradle.org/t/gradle-spring-boot-plugin/26407/3 "2018-03-28T06:08:28Z")

</div>

Thank you, @jjustinic

It seems that the simplest solution is the following:

```
dependencyManagement {
     imports {
          mavenBom 'org.springframework.boot:spring-boot-starter-parent:2.0.0.RELEASE'
     }
}
```
