我有一个单独的 gradle 脚本,它只是添加了 spring-boot 插件。它看起来像这样:
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven { url 'http://repo.spring.io/libs-release' }
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.1.8.RELEASE'
}
}
apply plugin: 'spring-boot'
然后,在另一个项目中,它是这样引用的:
apply from: '../../food-orders-online-main/spring-boot.gradle'
当我运行构建任务时,出现以下错误:
A problem occurred evaluating script.
> Failed to apply plugin [id 'spring-boot']
> Plugin with id 'spring-boot' not found.
有人知道我在做什么错吗?
原文由 Rade Milovic 发布,翻译遵循 CC BY-SA 4.0 许可协议
脚本插件不支持通过插件 ID 应用插件。您必须使用插件的完全限定类名。
有关更多信息,请参阅 此线程。
更新: 更新插件类名。