簡體   English   中英

無法下載 Spring Boot 2.1.7.RELEASE

[英]Unable to download Spring Boot 2.1.7.RELEASE

我不熟悉 Spring eco 並運行 gradle 來安裝所需的模塊。

我剛剛克隆了這個 spring boot repo 並嘗試運行它

git@github.com:didinj/springboot-mongodb-security.git

Plugin [id: 'org.springframework.boot', version: '2.1.7.RELEASE'] was not found in any of the following sources:

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'org.springframework.boot', version: '2.1.7.RELEASE'] 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:org.springframework.boot.gradle.plugin:2.1.7.RELEASE')
  Searched in the following repositories:
    Gradle Central Plugin Repository
    at .....

怎么來的? 這是否意味着 'org.springframework.boot', version: '2.1.7.RELEASE' 不在這個世界上了? 如果是這樣,包管理系統就是廢話。

我該怎么辦? 我從 github 克隆了一堆 git repos 並嘗試運行 gradle 並且總是有這個問題。

Java 生態系統太破碎了。 與 NPM 或 ruby​​ gem 不同,它們非常穩定且無需大腦即可使用。

是否與我的 gradle 設置、java 版本或其他任何內容有關?

使用 JDK 8。在https://github.com/didinj/springboot-mongodb-security/blob/master/src/main/resources/application.properties更改或配置 MongoDB

git clone https://github.com/didinj/springboot-mongodb-security.git
cd springboot-mongodb-security
gradlew bootRun

Maven Central Repository(在你的build.gradle腳本中使用)沒有這個插件的2.1.7.RELEASE版本,因為這個版本已經過時了。 但它仍然可以在 Gradle Plugin Repository ( https://mvnrepository.com/artifact/org.springframework.boot/org.springframework.boot.gradle.plugin/2.1.17.RELEASE ) 訪問。

因此,您應該使用中央存儲庫 (2.2.0.RELEASE) 中最少可用的插件版本,或者將 Gradle Plugin Repository 添加到build.gradlerepositories部分

repositories {
  mavenCentral()

  maven { url "https://plugins.gradle.org/m2/" }
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM