refreshVersions icon indicating copy to clipboard operation
refreshVersions copied to clipboard

Would be great if this worked with Spring Dependency Management plugin

Open madorb opened this issue 4 years ago • 1 comments

Our projects use the Spring Dependency Management plugin for importing maven BOM files (as the native gradle functionality doesn't actually mimic the semantics of the maven approach, specifically overriding versions: https://github.com/gradle/gradle/issues/9160) https://docs.spring.io/dependency-management-plugin/docs/current/reference/html/

I am not gradle-smart enough to know if this is actually feasible or not, but this is unfortunately a blocker for us to fully move to the plugin.

madorb avatar Jan 20 '21 16:01 madorb

Hello @madorb sorry for the late reply. Could you describe what doens't work exactluy?

jmfayard avatar Aug 08 '21 04:08 jmfayard

Also, you should just stop using that plugin. The version odering changes in that plugin would already have been removed if the maintainers would have had the time according to the maintainers, and they themselves strongly advice to use the built-in mechanism instead. The plugin is just a relict from times before Gradle had the functionality built-in. I don't think any effort to support it would be worth the time.

Vampire avatar Feb 09 '23 09:02 Vampire

@Vampire , I switched using Gradle's java-platform plugin but one use case I have recently could move it back to Spring Dependency plugin which is the ability to easily define exclusion.

https://docs.spring.io/dependency-management-plugin/docs/current/reference/html/#dependency-management-configuration-dsl-exclusions

java-platform doesn't support it at the moment: https://github.com/gradle/gradle/issues/12214

koalalam avatar Jul 18 '23 09:07 koalalam

You are talking about planting an apple tree vs. eating apples. The spring dependency management plugin is about consuming BOMs. The java-platform plugin and the issue you mentioned are about producing BOMs.

Vampire avatar Jul 18 '23 18:07 Vampire

refreshVersions works with BoMs, just use the version placeholder (_) for the version of the bom dependency (don't forget platform or enforcedPlatform !), and don't specify the versions of dependencies whose versions should be taken from said BoM.

LouisCAD avatar Aug 28 '23 23:08 LouisCAD