Плагин с идентификатором org.springframework.boot не найден

Я решил эту проблему следующим образом:

import calendar
from datetime import datetime
moths2add = 6
now = datetime.now()
current_year = now.year
current_month = now.month
#count days in months you want to add using calendar module
days = sum(
  [calendar.monthrange(current_year, elem)[1] for elem in range(current_month, current_month + moths)]
    )
print now + days
0
задан buratino 13 March 2019 в 23:14
поделиться

1 ответ

Это решение для моего варианта использования основано на ответе Абдельгани.

build.gradle

plugins {
    id 'org.springframework.boot' version '2.1.3.RELEASE'
    id 'java'
}

apply from: 'boot.gradle'

boot.gradle

repositories {
    mavenCentral()
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'

dependencies {
    implementation platform('org.springframework.boot:spring-boot-dependencies:2.0.0.RELEASE')

    implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.0.0.RELEASE'
    implementation group: 'org.springframework.boot', name: 'spring-boot-starter-tomcat', version: '2.0.0.RELEASE'

    implementation group: 'org.springframework.boot', name: 'spring-boot-gradle-plugin', version: '2.0.0.RELEASE'
}

Короче говоря, сценарий сборки должен иметь 'org. springframework.boot 'доступен как плагин для apply plugin: 'org.springframework.boot' для работы в другом месте.

0
ответ дан buratino 13 March 2019 в 23:14
поделиться
Другие вопросы по тегам:

Похожие вопросы: