gradle-versions-plugin: Bad resolution for BOM-style dependencies

It looks like there’s an issue with dependencies declared as mavenBom, e.g.

dependencyManagement {
    imports {
        mavenBom("com.amazonaws:aws-java-sdk-bom:$awsSdkVersion")
    }
}

In my case, the version is 1.10.56, whereas 1.10.62 is the most recent one at time of writing. I’m almost sure that the plugin stopped reporting newer versions of this dependency when I switched to the BOM style.

Also, not explicitly a BOM, but it works in a similar manner - Spring Boot dependency. The plugin is imported and appliesjust like any other plugin:

buildscript {
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
    }
}

apply plugin: 'spring-boot'

with my current version being 1.3.3.RELEASE. Dependencies are added without versions, e.g. compile('org.springframework.boot:spring-boot-starter-web').

The plugin (when executed with -Drevision=release) now reports 1.4.0.M1 as the latest release version of the plugin, but correctly indicates that 1.3.3.RELEASE is the latest release version of each dependency.

As much as the Spring Boot issue is not a big problem - the dependencies themselves are reported correctly - the AWS SDK issue is causing some inconvenience.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 26 (12 by maintainers)

Most upvoted comments

Using @the4yeast example, @wilkinsona’s latest release and his requested changes, the update report comes out properly. Note that I had to check dependency.artifacts.empty because file dependencies don’t implement SelfResolvingDependency (as not “independent of a repository”).

The following dependencies are using the latest milestone version:
 - io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE
 - com.github.ben-manes:gradle-versions-plugin:0.13.0

The following dependencies have later milestone versions:
 - com.amazonaws:aws-java-sdk-dynamodb [1.10.56 -> 1.11.10]
 - com.fasterxml.jackson.datatype:jackson-datatype-jdk8 [2.6.5 -> 2.8.0.rc2]
 - org.springframework.boot:spring-boot-gradle-plugin [1.3.3.RELEASE -> 1.4.0.M3]
 - org.springframework.boot:spring-boot-starter-web [1.3.3.RELEASE -> 1.4.0.M3]

@jochenberger Can you please perform the release (0.13.0)?

All experiments I’ve tried can’t bypass this plugin, as it applies itself to all project configurations. The buildscript output is expected since it doesn’t restrict those configurations.

@wilkinsona please advise if there is any way to make our plugins compatible.