spring-gradle-plugins / dependency-management-plugin

A Gradle plugin that provides Maven-like dependency management functionality
690 stars 88 forks source link

Migration to Gradle 4.6's IMPROVED_POM_SUPPORT feature? #205

Closed avonengel closed 6 years ago

avonengel commented 6 years ago

Hi everyone,

This is not a bug or something, but I didn't find a discussion board on the Spring website. I'd like to know if there already are plans on how to migrate/use Gradle 4.6's new IMPROVED_POM_SUPPORT?

This functionality might supersede the dependency-management-plugin in the long run. For now there will probably some cases where the feature-preview functionality does not cover something that is possible using this plugin.

As far as I know, the spring-boot plugin will auto-apply the spring-dependency-management plugin, though. Is there already some way to use Boot, but with the IMPROVED_POM_SUPPORT feature preview?

Thanks and keep up the good work :) Axel

wilkinsona commented 6 years ago

My hope is that Gradle's own bom support will eventually supersede this plugin, but that may take a long time if it even happens at all.

As of Spring Boot 2.0, it doesn't apply this plugin automatically. You have to apply it yourself if you want to opt in to Boot's dependency management. With Gradle 4.6, you could, if you are comfortable with its limitations, use Gradle's improved pom support instead.

avonengel commented 6 years ago

@wilkinsona That's great to hear :) Is it possible to use Spring 4.x with the Spring Boot 2.0 plugin, though?

wilkinsona commented 6 years ago

No (and that has nothing to do with this plugin).

jkasten2 commented 4 years ago

I found the Importing version recommendations from a Maven BOM part of Gradle's documentation explains this feature in more detail with better examples.

Gradle treats all entries in the block of a BOM similar to Gradle’s dependency constraints. This means that any version defined in the block can impact the dependency resolution result. In order to qualify as a BOM, a .pom file needs to have pom set.

I don't use this project, however I found this thread when searching for Gradle BOM and felt this would be a constructive to this thread.