请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

项目构建执行gradle testClasses报错

我在执行cradle testClasses报错,完整命令行如下
xiaokun@xxiaokundeMacBook-Pro spring-boot % gradle testClasses
Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

  • Where:
    Settings file ‘/Users/xiaokun/Documents/workfactory/spring-boot/settings.gradle’ line: 26

  • What went wrong:
    Plugin [id: ‘io.spring.gradle-enterprise-conventions’, version: ‘0.0.3’] 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 ‘io.spring.gradle-enterprise-conventions:io.spring.gradle-enterprise-conventions.gradle.plugin:0.0.3’)
    Searched in the following repositories:
    MavenRepo
    Gradle Central Plugin Repository
    maven(https://repo.spring.io/plugins-release)
  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 30s

gradle我用的不多,看报错指向的是setting.gradle中的下面这一段id “io.spring.gradle-enterprise-conventions” version “0.0.3”,还请老师确认下是什么原因怎么解决这个问题
plugins {
id “com.gradle.enterprise” version "3.3.3"
id “io.spring.gradle-enterprise-conventions” version “0.0.3”
}

正在回答 回答被采纳积分+3

1回答

Jimmy 2024-06-26 10:45:10

spring-boot源码执行 testClasses 会消耗大量本地资源和网络资源,第一次执行有较多的外部依赖需要下载,鉴于网络环境的不确定性可能会下载失败,如果单存这个 plugins资源执行失败 可以注释掉重新执行试一下

plugins {
id “com.gradle.enterprise” version "3.3.3"
//id “io.spring.gradle-enterprise-conventions” version “0.0.3”
}

0 回复 有任何疑惑可以回复我~
  • 景庆 #1
    老师我又问题,我现在安装gradle没有testClasses这个指令,使用gradle tasks 也没有展示这个指令,请问这个如何解决呀
    回复 有任何疑惑可以回复我~ 2024-10-18 22:16:37
问题已解决,确定采纳
还有疑问,暂不采纳
Java七大热门技术框架源码解析
  • 参与学习       155    人
  • 解答问题       2    个

Java七大热门技术框架源码解析

了解课程
意见反馈 帮助中心 APP下载
官方微信