gpt4 book ai didi

java - Gradle 构建因从服务器 : Proxy Authentication Required, 接收到状态代码 407 而失败,但具有类似 deps 的另一个项目成功

转载 作者:行者123 更新时间:2023-12-02 00:13:22 33 4
gpt4 key购买 nike

Could not resolve com.amazonaws:aws-java-sdk-core:1.11.438.
Required by:
project : > com.amazonaws:amazon-kinesis-client:1.10.0 > com.amazonaws:aws-java-sdk-dynamodb:1.11.438
project : > com.amazonaws:amazon-kinesis-client:1.10.0 > com.amazonaws:aws-java-sdk-kinesis:1.11.438
project : > com.amazonaws:amazon-kinesis-client:1.10.0 > com.amazonaws:aws-java-sdk-cloudwatch:1.11.438
project : > com.amazonaws:amazon-kinesis-client:1.10.0 > com.amazonaws:aws-java-sdk-dynamodb:1.11.438 > com.amazonaws:aws-java-sdk-s3:1.11.438
project : > com.amazonaws:amazon-kinesis-client:1.10.0 > com.amazonaws:aws-java-sdk-dynamodb:1.11.438 > com.amazonaws:aws-java-sdk-s3:1.11.438 > com.amazonaws:aws-java-sdk-kms:1.11.438

Could not resolve com.amazonaws:aws-java-sdk-core:1.11.438. Could not get resource 'https://repo.maven.apache.org/maven2/com/amazonaws/aws-java-sdk-core/1.11.438/aws-java-sdk-core-1.11.438.pom'. Could not GET 'https://repo.maven.apache.org/maven2/com/amazonaws/aws-java-sdk-core/1.11.438/aws-java-sdk-core-1.11.438.pom'. Received status code 407 from server: Proxy Authentication Required

我在一个 java/spring/gradle 项目中的 ./gradlew clean build 上收到上述错误,但在我同时打开的另一个非常相似的 java/spring/gradle 项目中,具有相同的依赖项,然后一些,gradle构建运行成功,所以似乎特定项目有问题。

我的项目中没有任何可用的代理设置/配置。

以下是成功项目中的部门:

dependencies {
//spring
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-web")
testImplementation('org.springframework.boot:spring-boot-starter-test')

//aws
implementation("com.amazonaws:aws-java-sdk-sts:${depVersions.awsSdk}")
implementation("com.amazonaws:amazon-kinesis-client:${depVersions.kcl}")
implementation("com.amazonaws:amazon-kinesis-producer:${depVersions.kpl}")
implementation("com.amazonaws:dynamodb-streams-kinesis-adapter:${depVersions.dynamoStreams}")
implementation("redis.clients:jedis:${depVersions.redis}")

//azure
implementation("com.microsoft.azure:applicationinsights-web:${depVersions.appInsights}")
implementation("com.microsoft.azure:applicationinsights-logging-logback:${depVersions.appInsights}")
implementation("com.microsoft.azure:applicationinsights-logging-log4j2:${depVersions.ailog4j}")
implementation("com.microsoft.azure:azure-eventhubs:${depVersions.azureEventHubs}")

//util
implementation("com.google.code.gson:gson:${depVersions.gson}")
implementation("org.apache.logging.log4j:log4j:${depVersions.log4j}")
implementation("com.netflix.feign:feign-slf4j:${depVersions.slf4j}")
implementation("org.json:json:${depVersions.json}")
}

以及引发上述错误的相关项目的部门:

dependencies {
//spring
implementation('org.springframework.boot:spring-boot-starter')
implementation("org.springframework.boot:spring-boot-starter-web")
testImplementation('org.springframework.boot:spring-boot-starter-test')

//aws
implementation("com.amazonaws:amazon-kinesis-client:${depVersions.kcl}")
implementation("com.amazonaws:amazon-kinesis-producer:${depVersions.kpl}")

//azure
implementation("com.microsoft.azure:applicationinsights-web:${depVersions.appInsights}")
implementation("com.microsoft.azure:applicationinsights-logging-logback:${depVersions.appInsights}")
implementation("com.microsoft.azure:applicationinsights-logging-log4j2:${depVersions.ailog4j}")

//util
implementation("com.google.code.gson:gson:${depVersions.gson}")

}

此外,在后者(有错误的项目)build.gradle 文件中,编译器无法解析 bootRun{} 或 bootJar{} 等符号,我不明白为什么,它们的配置似乎相同。

最佳答案

原来我需要更新我的 gradle.properties 文件中的代理密码

关于java - Gradle 构建因从服务器 : Proxy Authentication Required, 接收到状态代码 407 而失败,但具有类似 deps 的另一个项目成功,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58107084/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com