spring-boot gradle plugin can't be found

前端 未结 8 1256
醉话见心
醉话见心 2021-02-05 02:44

I have a separate gradle script that is just adding spring-boot plugin. It looks like this:

buildscript {
    repositories {
        mavenLocal()
        mavenCe         


        
8条回答
  •  难免孤独
    2021-02-05 03:00

    As of now July first 2020, this is how I was able to configure it, and it worked! Hopefully, this can help anyone facing this problem. Note: Pay attention to the versions

    buildscript {
            repositories {
                mavenCentral()
            }
            dependencies {
                classpath('org.springframework.boot:spring-boot-gradle-plugin:2.2.8.RELEASE')
            }
        }
        
        plugins {
            id 'org.springframework.boot' version '2.2.8.RELEASE'
            id 'java'
        }
        
        group 'org.capfer'
        version '1.0-SNAPSHOT'
        
        sourceCompatibility = 1.8
        
        repositories {
            mavenCentral()
        }
        
        dependencies {
            testCompile group: 'junit', name: 'junit', version: '4.12'
            compile('org.springframework.boot:spring-boot-starter-web:2.2.8.RELEASE')
        }
    

提交回复
热议问题