spring-gradle-plugins / dependency-management-plugin

A Gradle plugin that provides Maven-like dependency management functionality

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

loading the plugin via libs.versions.toml fails

mrt181 opened this issue · comments

commented

Hi I have this setup

build.gradle.kts

plugins {
    java
    application
    alias(libs.plugins.spring.boot)
    alias(libs.plugins.spring.dependency.management)
//    id("io.spring.dependency-management") version "1.1.0"
 }

settings.gradle.kts

pluginManagement {
    repositories {
        mavenCentral()
        gradlePluginPortal()
        maven { url = uri("https://repo.spring.io/release") }
        maven { url = uri("https://repo.spring.io/snapshot") }
    }
}

libs.versions.toml

[versions]

[libraries]

[plugins]
spring-boot = { id = "org.springframework.boot", version = "3.1.0" }
spring-dependency-management = { id = "org.spring.dependency-management", version = "1.1.0" }

Which fails with this message

Build file '/home/martin/repos/playground/supernova/build.gradle.kts' line: 1

Plugin [id: 'org.spring.dependency-management', version: '1.1.0'] was not found in any of the following sources:

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'org.spring.dependency-management', version: '1.1.0'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.spring.dependency-management:org.spring.dependency-management.gradle.plugin:1.1.0')
  Searched in the following repositories:
    MavenRepo
    Gradle Central Plugin Repository
    maven(https://repo.spring.io/release)
    maven2(https://repo.spring.io/snapshot)

When I remove the alias and use the plugin id directly it works.

Looks like user error to me:

spring-dependency-management = { id = "org.spring.dependency-management", version = "1.1.0" }

This should be io.spring.dependency-management.

commented

Looks like user error to me:

spring-dependency-management = { id = "org.spring.dependency-management", version = "1.1.0" }

This should be io.spring.dependency-management.

yes, shame