简体   繁体   English

Gradle build failed for Received status code 407 from server: Proxy Authentication Required, but another project's with similar deps Success

[英]Gradle build fails for Received status code 407 from server: Proxy Authentication Required, but another project's with similar deps succeeds

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.无法解析 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 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 '. 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从服务器收到状态代码 407:需要代理身份验证

I get the above errors on ./gradlew clean build in one java/spring/gradle project, but in another very similar java/spring/gradle project that I have open at the same time which has the same dependencies and then some, the gradle build runs successfully, so it seems something is wrong with the specific project.我在一个 java/spring/gradle 项目中的./gradlew clean build上遇到上述错误,但在我同时打开的另一个非常相似的 java/spring/gradle 项目中,它具有相同的依赖关系,然后是 gradle构建成功运行,因此特定项目似乎有问题。

I do not have any proxy settings/config in the project that works.我在有效的项目中没有任何代理设置/配置。

here are the deps in the successful project:以下是成功项目中的部门:

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}")
}

and the deps from the project in question that throws the above error:以及引发上述错误的相关项目的部门:

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}")

}

also, in the latter (project with error) build.gradle file, the compiler cannot resolve symbols like bootRun{} or bootJar{} and i cant figure out why, their configurations seem equal.此外,在后者(有错误的项目)build.gradle 文件中,编译器无法解析 bootRun{} 或 bootJar{} 等符号,我不知道为什么,它们的配置似乎相同。

turns out i needed to update the proxy password in my gradle.properties file原来我需要更新我的 gradle.properties 文件中的代理密码

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Gradle SpringBoot 项目:从服务器收到状态代码 501:HTTPS 必需 - Gradle SpringBoot Project : Received status code 501 from server: HTTPS Required 需要HTTP 407代理身份验证:如何用Java代码处理 - http 407 proxy authentication required : how to handle in java code 需要HTTP错误407代理身份验证 - HTTP Error 407 Proxy authentication required gradle项目的构建失败 - gradle project's build fails Java Rest请求期间偶尔出现“ 407代理身份验证必需”错误 - “407 Proxy Authentication Required” error during java rest request occationally HTTPS URL的基本代理身份验证返回HTTP / 1.0 407需要代理身份验证 - Basic proxy authentication for HTTPS URLs returns HTTP/1.0 407 Proxy Authentication Required 詹金斯:IOException:无法通过代理隧道。 代理返回“需要HTTP / 1.1 407代理身份验证” - Jenkins: IOException: Unable to tunnel through proxy. Proxy returns “HTTP/1.1 407 Proxy Authentication Required” 由于'fatJar任务',Gradle构建失败,尽管代码在另一个项目中适用于我 - Gradle build fails thanks to 'fatJar task' although code worked for me in another project 在Firebug控制台中获得js,图像,aspx和html请求所需的407代理身份验证 - Getting 407 Proxy Authentication Required for js, images, aspx and html requests in firebug console org.apache.axis2.AxisFault:传输错误:407错误:需要代理身份验证 - org.apache.axis2.AxisFault:Transport error: 407 Error:Proxy Authentication Required
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM