1

I have a simple spring boot app that I am trying to add spring cloud consul to. Spring cloud consul relies on a newer version of spring boot. In my POM I have specified version 1.3.5.RELEASE for all my spring boot artifacts.

The problem is that, even though version 1.3.5 is specified for spring-boot-starter-web it still downloads dependencies with version 1.2.3

Is there a way to have maven get the 1.3.5.RELEASE for ALL spring boot artifacts, including transitive dependencies? I know I can explicitly list them all, but is there a better way?

Here is the POM depenency view from eclipse: enter image description here

Seephor
  • 1,692
  • 3
  • 28
  • 50

1 Answers1

0

Yes, simple use correct parent:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.3.6.RELEASE</version>
    <relativePath/> 
</parent>

and remove versions from spring boot dependencies.

MariuszS
  • 30,646
  • 12
  • 114
  • 155
  • what if I don't want to use the parent? I tried adding dependency management, but had no luck. – Seephor Jul 06 '16 at 20:39
  • Try this: http://stackoverflow.com/questions/21317006/spring-boot-parent-pom-when-you-already-have-a-parent-pom – MariuszS Jul 06 '16 at 21:08
  • not quite. I am still having issues. Specifically it cannot find the internal class org/springframework/boot/Banner$Mode and it is still using spring boot jars with version 1.2.3 even though I specified in the dependency management 1.3.6 – Seephor Jul 06 '16 at 21:37
  • so what I ended up doing was making my parent specify spring boot starter as the parent and that worked – Seephor Jul 06 '16 at 22:55