使用 Gradle 在 AWS Lambda 上使用 Spring Cloud Function 时出现问题

问题描述 投票:0回答:1

我正在尝试在 AWS Lambda 上运行 Spring Cloud Function。我按照官方样本 并尝试使用 gradlew build 命令来构建它。但是,我遇到了以下错误:

* What went wrong:
Plugin [id: 'org.springframework.cloud.function.aws-lambda.packaging', version: '1.0.0'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.springframework.cloud.function.aws-lambda.packaging:org.springframework.cloud.function.aws-lambda.packaging.gradle.plugin:1.0.0')
  Searched in the following repositories:
    MavenLocal(file:/C:/Users/a1501/.m2/repository/)
    maven(https://repo.spring.io/milestone)
    Gradle Central Plugin Repository

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

我不知道如何解决这个问题。谁能提供一些关于我应该如何成功构建项目的指导?

预先感谢您的帮助。

java spring aws-lambda spring-cloud-function
1个回答
0
投票

我认为 Spring 团队还没有将该插件发布到全球 Gradle 插件门户,而且它似乎也没有被推送到他们的里程碑存储库。

提交上的评论回应了您的问题https://github.com/spring-cloud/spring-cloud-function/commit/d5b7cb0d5a1e37e2c15647d4eac1e690aa919321#diff-ee8722aff295face894041206ab1588f13a884e661e54e669df36 2d17e33bd17

如果您从该提交中取消注释代码并删除插件,它将起作用。

© www.soinside.com 2019 - 2024. All rights reserved.