Я создал демонстрационный проект Gradle с именем transaction-search-jdbc-demo
из Spring , используя некоторые зависимости и ничего не меняя, просто разархивировал и импортировал в Intellij, используя файл Open -> build.gradle, и тоже пытался использовать Import
из окна Intellij по умолчанию. При импорте проект не является сборкой, и возникает ошибка о зависимостях gradle. Я использую Intellij 2019.3, JDK 1.8 в Ubuntu.
Ошибка
FAILURE: Build failed with an exception.
* Where:
Build file '/home/augusto.cadini/projects/Spring Applications/transaction-search-jdbc-demo/build.gradle' line: 2
* What went wrong:
Plugin [id: 'org.springframework.boot', version: '2.2.4.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.2.4.RELEASE')
Searched in the following repositories:
Gradle Central Plugin Repository
* 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
CONFIGURE FAILED in 208ms
build.gradle
plugins {
id 'org.springframework.boot' version '2.2.4.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'java'
}
group = 'com.jdbc'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
test {
useJUnitPlatform()
}