在SpringBoot应用程序中找不到Gradle插件

时间:2019-04-22 10:02:06

标签: spring-boot gradle plugins

我有一个多模块设置,当我尝试刷新gradle任务时,看到以下错误:

    Plugin [id: 'org.springframework.boot', artifact: 'org.springframework.boot:spring-boot-gradle-plugin:null'] 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.springframework.boot:spring-boot-gradle-plugin:null')
  Searched in the following repositories:
    maven(https://repo.spring.io/snapshot)
    maven2(https://repo.spring.io/milestone)
    Gradle Central Plugin Repository
Open File

我最近添加了一个新模块,自从添加该模块以来,我就可以看到此错误;尽管我已经删除了该模块,但错误仍然存​​在。我的主包build.gradle看起来像这样:

    plugins {
    id 'org.springframework.boot' version '2.1.4.RELEASE'
    id 'java'
}

apply plugin: 'io.spring.dependency-management'

group = 'com.pro.review'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'

configurations {
    compileOnly {
        extendsFrom annotationProcessor
    }
}

repositories {
    mavenCentral()
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
    implementation 'org.springframework.boot:spring-boot-starter-web'
    compileOnly 'org.projectlombok:lombok'
    annotationProcessor 'org.projectlombok:lombok'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
        compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.9.2'
    compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.9.2'
    compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.5'
        runtimeOnly 'org.postgresql:postgresql'
}

dependencies {
    compile project(':libs')
    compile project(':subscription-manager')
}

0 个答案:

没有答案