1

I have a Spring Boot project which uses "blessed" dependencies via the Gradle plugin. The dependencies block in my build.gradle file looks like this:

dependencies {
  compile "org.springframework.boot:spring-boot-starter-web"
  compile "org.springframework.boot:spring-boot-starter-data-jpa"

  compile "com.fasterxml.jackson.core:jackson-core"
  compile "com.fasterxml.jackson.dataformat:jackson-dataformat-csv"
}

(I've removed several other dependencies for brevity.)

The above code is broken because Spring Boot does not have a "blessed" version for the dataformat-csv extension.

All I want to do is get it to use the Spring Boot-derived version for jackson-core and use it for the jackson-dataformat-csv as well for consistency. How do I get the version number for that dependency if it's been derived by a plugin?

John Doe
  • 57
  • 4
Andy
  • 8,749
  • 5
  • 34
  • 59
  • You you should be able to see the derived dependencies. See http://stackoverflow.com/questions/21645071/using-gradle-to-find-out-a-dependency-tree – jny Nov 13 '15 at 22:04
  • Which version of Spring Boot are you using? 1.3 uses a separate dependency management plugin that gives you access to the managed versions. See the section in the [README](https://github.com/spring-gradle-plugins/dependency-management-plugin/blob/master/README.md) on accessing properties from imported boms. – Andy Wilkinson Nov 13 '15 at 22:11
  • @AndyWilkinson - That looks pretty slick! Looking forward to it when 1.3 is out of RC! – Andy Nov 13 '15 at 22:17
  • @jny - I know I can list them, but I want to be able to update the version of Spring Boot and have all the supported dependencies update appropriately. After looking at Spring Boot 1.3, though, it looks like my setup will change significantly anyway. – Andy Nov 13 '15 at 22:21
  • @Andy, it seems it can be done. You can asses the dependencies parse them and set appropriate version, however, if 1.3 will contain changes that solve this problem, I'm not sure if it's worth doing. – Opal Nov 14 '15 at 22:03
  • @Opal - Thanks for the insight. You're probably right about it not being worth messing with right now. – Andy Nov 16 '15 at 12:32

0 Answers0