找不到spring-boot gradle插件 [英] spring-boot gradle plugin can't be found
本文介绍了找不到spring-boot gradle插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个单独的gradle脚本,只添加了spring-boot插件.看起来像这样:
I have a separate gradle script that is just adding spring-boot plugin. It looks like this:
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'
然后,在另一个项目中,引用如下:
Then, in another project, it is referenced like this:
apply from: '../../food-orders-online-main/spring-boot.gradle'
运行构建任务时,出现以下错误:
When I run build task I'm getting the following error:
A problem occurred evaluating script.
> Failed to apply plugin [id 'spring-boot']
> Plugin with id 'spring-boot' not found.
有人知道我在做什么错吗?
Someone knows what I'm doing wrong?
推荐答案
脚本插件不支持按插件ID应用插件.您必须使用插件的完全限定的类名.
Applying a plugin by plugin id is not supported in script plugins. You must use the plugin's fully qualified class name.
apply plugin: org.springframework.boot.gradle.plugin.SpringBootPlugin
请参见此线程以获取更多信息.
See this thread for more information.
更新:更新插件类名称.
这篇关于找不到spring-boot gradle插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文