Home > other >  Spring native can't be found
Spring native can't be found

Time:10-21

Can't add spring native to an existing project, if I create a new one with spring native selected it works.

org.gradle.internal.exceptions.LocationAwareException: Build file '/Users/jakob/Documents/worklivery-backend/build.gradle.kts' line: 6 Plugin [id: 'org.springframework.experimental.aot', version: '0.10.4'] was not found in any of the following sources:

  • Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
plugins{
    ...
    id("org.springframework.experimental.aot") version "0.10.4"
}

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

CodePudding user response:

The AOT plugin isn't published to Gradle's plugin portal, it's only available from https://repo.spring.io. You need to add some configuration to your project's settings.gradle file so that it can be resolved:

pluginManagement {
  repositories {
    maven { url 'https://repo.spring.io/release' }
    mavenCentral()
    gradlePluginPortal()
  }
}

The above matches the configuration from a project generated by https://start.spring.io and adds Maven Central and https://repo.spring.io/release to the plugin repositories in addition to the default Gradle Plugin Portal.

  • Related