Gradle Build使用Jenkins失败,手动成功

发布于 2025-02-06 20:26:28 字数 679 浏览 2 评论 0原文

我正在尝试创建詹金斯任务来构建我的Gradle项目。 克隆git存储库并使用该项目的Gradle包装器效果很好。 但是,当它试图运行名为build Production的Gradle任务时,会出现以下错误:

Plugin [id: 'com.jfrog.artifactory', version: '4.7.2', apply: false] 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 'com.jfrog.artifactory:com.jfrog.artifactory.gradle.plugin:4.7.2')
  Searched in the following repositories:
    Gradle Central Plugin Repository

有趣的是,当我手动运行此gradle任务(在jenkins workspace内部的jenkins workspace中,库repo被克隆了),例如这样: gradlew build Production它运行完美,并且能够获取所有插件和依赖项。

I'm trying to create a Jenkins task to build my Gradle project.
Cloning the git repo and using the Gradle wrapper of the project works fine.
But when it tries to run the gradle task named buildProduction, fails with the following error:

Plugin [id: 'com.jfrog.artifactory', version: '4.7.2', apply: false] 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 'com.jfrog.artifactory:com.jfrog.artifactory.gradle.plugin:4.7.2')
  Searched in the following repositories:
    Gradle Central Plugin Repository

The interesting thing is when I manually run this Gradle task (inside the Jenkins workspace where the repo is cloned) like this:
gradlew buildProduction it works perfectly and is able to fetch all the plugins and dependencies.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文