Skip to content

spring-boot-gradle-plugin: Resolving configuration 'X' directly is not allowed #12778

@ChrLipp

Description

@ChrLipp

When using
classpath "org.springframework.boot:spring-boot-gradle-plugin:2.0.0.RELEASE"
together with
classpath "com.github.ben-manes:gradle-versions-plugin:0.17.0"

and you call gradlew dependencyUpdates the following error occurs:

21:59:53: Executing task 'dependencyUpdates'...

Failed to resolve ::apiElements
Failed to resolve ::implementation
Failed to resolve ::runtimeElements
Failed to resolve ::runtimeOnly
Failed to resolve ::testImplementation
Failed to resolve ::testRuntimeOnly
:dependencyUpdates

The concrete exception is

Failed to resolve ::testRuntimeOnly
java.lang.IllegalStateException: Resolving configuration 'testRuntimeOnly' directly is not allowed
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.assertResolvingAllowed(DefaultConfiguration.java:921)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveToStateOrLater(DefaultConfiguration.java:453)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getResolvedConfiguration(DefaultConfiguration.java:448)
        at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getResolvedConfiguration(Unknown Source)
        at org.springframework.boot.gradle.plugin.SpringBootPlugin.lambda$null$1(SpringBootPlugin.java:125)

triggered by the Spring Boot Gradle plugin.

See the original issue here: ben-manes/gradle-versions-plugin#220
See a sample project here: https://github.com/ChrLipp/instagram-downloader

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions