Собрать в автономном режиме с помощью gradle, но отсутствует плагинJAVA

Программисты JAVA общаются здесь
Ответить
Anonymous
 Собрать в автономном режиме с помощью gradle, но отсутствует плагин

Сообщение Anonymous »

Я пытаюсь собрать build.gradle в автономном режиме со всеми плагинами и библиотеками, загруженными на мой локальный компьютер.
Плагины загружаются в папку C:/Users/dd/Documents/cots_lib_gradleplugs.
buildscript {
// Define the absolute path or the correct relative path for offline access
// We will stick to the relative path as defined by 'repoDir'
def repoDir1 = "C:/Users/dd/Documents/"

repositories {
// Must declare a repository for Gradle to find plugins, even if we supply files directly.
// It's safer to ensure this flatDir is present and correct.
flatDir {
dirs "${repoDir1}/cots_lib/gradleplugs"
}
}
dependencies {
// Providing the JARs directly to the classpath
classpath files(
"${repoDir1}/cots_lib/gradleplugs/spring-boot-3.5.3.jar",
"${repoDir1}/cots_lib/gradleplugs/dependency-management-plugin-1.1.7.jar"
)

}
}

apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.gradle.dependencymanagement'
apply plugin: 'java'
apply plugin: 'war'

def profile = "devapidev1"

group = 'chs
version = '0.0.1-SNAPSHOT'

def useMavenCentral = false

java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}

def repoDir = "../../"

Однако, когда я запускаю это, я получаю следующую ошибку:
PS C:\Users\dd\Documents\api\api> ./gradlew build --offline

[Incubating] Problems report is available at: file:///C:/Users/dd/Documents/api/api/build/reports/problems/problems-report.html

FAILURE: Build failed with an exception.

* Where:
Build file C:\Users\dd\Documents\api\api\build.gradle line: 90

* What went wrong:
A problem occurred evaluating root project 'api'.
> Plugin with id 'org.springframework.boot' not found.


Подробнее здесь: https://stackoverflow.com/questions/798 ... ng-plug-in
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «JAVA»