Плагин [id: 'com.jfrog.artifactory', версия: '4.33.1'] не найден ни в одном из следующих источников:JAVA

Программисты JAVA общаются здесь
Ответить
Anonymous
 Плагин [id: 'com.jfrog.artifactory', версия: '4.33.1'] не найден ни в одном из следующих источников:

Сообщение Anonymous »

Итак, есть бэкэнд, который был написан ранее, но по каким-то причинам не может быть запущен (я пробовал использовать IntelliJ, а также из терминала). gradle.properties настроены правильно, но я каждый раз получаю эту ошибку :
Build file 'C:\Users\Desktop\Land-Backend\build.gradle' line: 5

Plugin [id: 'com.jfrog.artifactory', version: '4.33.1'] was not found in any of the following sources:

* 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 6s

Я использую Windows. Есть идеи по этому поводу?
Я пробовал удалить файлы .gradle и попытаться запустить их, но не помогло< /p>
Я думаю, что проблема может быть в том, что Windows автоматически подключается к некоторым файлам после загрузки IntelliJ.
Я попробовал удалить файлы .gradle и .idea после все зависимости были правильными, но подключиться к артефакту по-прежнему не удается.
Here is my build.gradle file:

import org.gradle.api.services.BuildService
import org.gradle.api.services.BuildServiceParameters

plugins {
id "com.jfrog.artifactory" version "4.33.1"
id 'com.gorylenko.gradle-git-properties' version '2.4.1' apply false
id 'jacoco'
id 'java'
id 'java-library'
id 'org.liquibase.gradle' version '2.2.0'
id 'org.sonarqube' version '4.2.1.3168'
id 'org.springframework.boot' version '3.1.1' apply false
id 'org.jetbrains.kotlin.jvm' version '1.9.0'
id 'org.jetbrains.kotlin.plugin.jpa' version '1.9.0'
id 'org.jetbrains.kotlin.plugin.spring' version '1.9.0'
}

def artifactoryAuthentication(MavenArtifactRepository repo) {
repo.credentials(PasswordCredentials) {
username = project.findProperty("artifactory_user") ?: "your-username"
password = project.findProperty("artifactory_token_secret") ?: "your-token"
}
}

def noParallelUsageService = project.getGradle().getSharedServices().registerIfAbsent(
"noParallelUsageService",
AbstractService.class,
spec -> {
spec.getMaxParallelUsages().set(1)
}
)

ext {
platformVersion = '6.2.3'
}
def exclusionList = [
"**/com/example/moduletemplate/configuration/*",
"**/com/example/moduletemplate/YourApplication.java",
"**/com/example/moduletemplate/service/configuration/*"
]
allprojects {
group 'com.example.land'
version '6.2.3'

apply plugin: 'java-library'

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

repositories {
maven {
url "${project.findProperty("artifactory_url") ?: 'your-artifactory-url'}/ap-releases/"
artifactoryAuthentication it
}
maven {
url "${project.findProperty("artifactory_url") ?: 'your-artifactory-url'}/ap-snapshots/"
artifactoryAuthentication it
}
maven {
url "${project.findProperty("artifactory_url") ?: 'your-artifactory-url'}/apache-maven/"
artifactoryAuthentication it
}
}
}

subprojects {

each {
buildDir = "$project.rootDir/build/${project.path.replace(':', '/')}" as File
afterEvaluate {
if (!tasks.findByName('bootJar')?.enabled) {
archivesBaseName = "${group}.${name}"
}
}

tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.compilerArgs += [
'-Amapstruct.unmappedTargetPolicy=ERROR'
]
}
}

// There is a problem with long paths on windows, so jacoco is not used than
if (!System.properties['os.name'].toLowerCase().contains('windows')) {
apply plugin: 'jacoco'
}
apply plugin: 'org.sonarqube'

// let each subproject report the merged coverage report
sonarqube {
properties {
property 'sonar.coverage.exclusions', exclusionList
property 'sonar.coverage.jacoco.xmlReportPaths', "$project.rootDir/build/reports/jacoco/codeCoverageReport/codeCoverageReport.xml"
}
}

testing {
suites {
test {
targets {
configureEach {
testTask.configure {
finalizedBy jacocoTestReport
useJUnitPlatform()
maxHeapSize = "2048m"
}
}
}
}

integrationTest(JvmTestSuite) {
dependencies {
implementation project(':app')
}

sources {
java {
srcDirs = ['src/integrationTest/java']
}
}

targets {
configureEach {
testTask.configure {
shouldRunAfter(test)
usesService(noParallelUsageService)
}
}
}
}
}
}

tasks.named('check') {
dependsOn(testing.suites.integrationTest)
}

jacocoTestReport {
reports {
xml {
enabled true
}
csv {
enabled false
}
html {
enabled false
}
}
}

dependencies {
[
'implementation', 'compileOnly', 'annotationProcessor',
'testCompileOnly', 'testAnnotationProcessor',
'integrationTestImplementation', 'integrationTestAnnotationProcessor',
].each {
add it, enforcedPlatform("com.example:common-platform:${rootProject.ext.platformVersion}")
}

constraints {
api 'com.example.gurobi:gurobi-environment:0.0.5'
api 'com.example.gurobi:gurobi-lib:9.1'
api 'com.example.gurobi:gurobi-linux-lib:9.1.2'
api 'com.example:balancing-optimization:1.0-SNAPSHOT'
api "com.example:common-auth:${rootProject.ext.platformVersion}"
api "com.example:common-base:${rootProject.ext.platformVersion}"
api "com.example:common-gdpr:${rootProject.ext.platformVersion}"
api "com.example:common-defaultproperties:${rootProject.ext.platformVersion}"
api 'com.example:tier-calculations-backend:14'
api "com.example:common-content-translation-settings:${rootProject.ext.platformVersion}"
}

implementation(
'org.springframework.boot:spring-boot-starter-logging',
'org.springframework.boot:spring-boot-starter-validation',
'org.mapstruct:mapstruct',
'org.mapstruct:mapstruct-processor'
)

compileOnly(
'org.projectlombok:lombok',
'com.google.code.findbugs:jsr305'
)

annotationProcessor(
'org.projectlombok:lombok',
'org.mapstruct:mapstruct',
'org.mapstruct:mapstruct-processor',
'org.projectlombok:lombok-mapstruct-binding',
'org.mapstruct.extensions.spring:mapstruct-spring-extensions',
'org.mapstruct.extensions.spring:mapstruct-spring-annotations',
'org.mapstruct:mapstruct-processor',
'org.hibernate:hibernate-jpamodelgen'
)

runtimeOnly(
'com.h2database:h2'
)

testImplementation(
'org.junit.jupiter:junit-jupiter',
'org.assertj:assertj-core',
'org.mockito:mockito-core',
'org.mockito:mockito-junit-jupiter',
'org.hamcrest:hamcrest',
'org.springframework.boot:spring-boot-test'
)

testCompileOnly(
'org.projectlombok:lombok'
)

testRuntimeOnly(
'org.junit.platform:junit-platform-engine',
'org.junit.platform:junit-platform-commons'
)

testAnnotationProcessor(
'org.projectlombok:lombok',
'org.mapstruct:mapstruct',
'org.mapstruct:mapstruct-processor',
'org.projectlombok:lombok-mapstruct-binding',
'org.mapstruct.extensions.spring:mapstruct-spring-extensions',
'org.mapstruct.extensions.spring:mapstruct-spring-annotations',
'org.mapstruct:mapstruct-processor'
)

pluginManager.withPlugin('java-test-fixtures') {
['testFixturesImplementation', 'testFixturesAnnotationProcessor'].each {
add it, enforcedPlatform("com.example:common-platform:${rootProject.ext.platformVersion}")
}

testFixturesImplementation(
'org.projectlombok:lombok',
'org.mapstruct:mapstruct',
'org.mapstruct:mapstruct-processor',
)

testFixturesAnnotationProcessor(
'org.projectlombok:lombok',
'org.mapstruct:mapstruct',
'org.mapstruct:mapstruct-processor',
'org.projectlombok:lombok-mapstruct-binding',
'org.mapstruct.extensions.spring:mapstruct-spring-extensions',
'org.mapstruct.extensions.spring:mapstruct-spring-annotations',
'org.mapstruct:mapstruct-processor'
)
}
}

}

task codeCoverageReport(type: JacocoReport) {

// Gather execution data from all subprojects
executionData fileTree(project.rootDir.absolutePath).include("build/**/jacoco/*.exec")

// Add all relevant sourceSets from the subprojects
subprojects.each {
sourceSets it.sourceSets.main
}

reports {
xml.required = true
csv.required = false
html.required = false
}
}

// always run the tests before generating the report
codeCoverageReport.dependsOn {
subprojects*.check
}

// automatically create the codeCoverageReport after running check
check {
finalizedBy codeCoverageReport
}

abstract class AbstractService implements BuildService {}


Подробнее здесь: https://stackoverflow.com/questions/789 ... -in-any-of
Ответить

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

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

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

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

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