Gradle Build使用Jenkins失败,手动成功
我正在尝试创建詹金斯任务来构建我的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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论