Java 找不到spring-boot-2.3.0.BUILD-SNAPSHOT.jar错误

Java 找不到spring-boot-2.3.0.BUILD-SNAPSHOT.jar错误,java,spring,spring-boot,gradle,Java,Spring,Spring Boot,Gradle,当我试图在gradle中构建spring boot项目时,我遇到了以下错误。我从spring initilizer那里得到了这个版本 无法解析配置“:classpath”的所有项目。 找不到spring-boot-gradle-plugin-2.3.0.BUILD-SNAPSHOT.jar(org.springframework.boot:spring-boot-gradle-plugin:2.3.0.BUILD-SNAPSHOT:20200409.145011-519)。 在以下位置搜索:

当我试图在gradle中构建spring boot项目时,我遇到了以下错误。我从spring initilizer那里得到了这个版本

无法解析配置“:classpath”的所有项目。 找不到spring-boot-gradle-plugin-2.3.0.BUILD-SNAPSHOT.jar(org.springframework.boot:spring-boot-gradle-plugin:2.3.0.BUILD-SNAPSHOT:20200409.145011-519)。 在以下位置搜索:

请找到我的gradle build

plugins {
    id 'org.springframework.boot' version '2.3.0.BUILD-SNAPSHOT'
    id 'io.spring.dependency-management' version '1.0.9.RELEASE'
    id 'java'
}

group = 'com.mycompany'
version = '0.0.1-SNAPSHOT' //TODO how does verioning work in this project?
sourceCompatibility = '1.8'

configurations {
    compileOnly {
        extendsFrom annotationProcessor
    }
}

repositories {
    mavenCentral()
    maven { url 'https://repo.spring.io/milestone' }
    maven { url 'https://repo.spring.io/snapshot' }
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-integration'
    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'org.springframework.kafka:spring-kafka'
    implementation 'org.springframework.boot:spring-boot-starter-aop'

    compileOnly 'org.projectlombok:lombok'
    annotationProcessor 'org.projectlombok:lombok'
    testImplementation('org.springframework.boot:spring-boot-starter-test') {
        exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
    }
    testImplementation ('org.springframework.integration:spring-integration-test'){
        exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
    }
    testImplementation ('org.springframework.kafka:spring-kafka-test'){
        exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
    }
    testImplementation group: 'org.mockito', name: 'mockito-all', version: '1.10.19'
}

test {
    useJUnitPlatform()
}

如果您没有特殊原因专门使用
快照
版本,我建议您使用release或milestone

快照构建非常不稳定。如果你想看看新的2.3版本的SpringBoot,你可能应该使用milestone版本。今天的版本是
2.3.0.M4

为此,更改
org.springframework.boot
插件版本如下:

id 'org.springframework.boot' version '2.3.0.M4'

问题的可能原因是,构建的
jar
pom
人工制品的名称应该相同,但是在我看来,
jar
时间戳与519构建的其他构建人工制品不同。也许这不应该发生。