gpt4 book ai didi

eclipse - Gradle Artifactory 插件错误

转载 作者:行者123 更新时间:2023-12-02 15:58:33 25 4
gpt4 key购买 nike

我的gradle版本是2.2.1。

我正在尝试在 gradle 中使用 artifactory 插件(应用插件:'artifactory')

这是我的代码:

buildscript {
repositories {
maven {
url 'http://172.14.3.93/artifactory/plugins-release'

}

}
dependencies {
classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '2.0.9')
}
}

allprojects {
apply plugin: 'artifactory'
}

artifactory {
contextUrl = "${artifactory_contextUrl}" //The base Artifactory URL if not overridden by the publisher/resolver
publish {
repository {
repoKey = 'libs-release-local'
maven = true

}
}
resolve {
repository {
repoKey = 'libs-release'
maven = true

}
}
}

当我运行 gradle build 时,这就是我得到的:

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Workspace\GradleConfiguration\build.gradle' line: 100

* What went wrong:
A problem occurred evaluating root project 'GradleConfiguration'.
> Failed to apply plugin [id 'artifactory']
> Could not find method add() for arguments [artifactoryPublish, class org.jfrog.gradle.plugin.artifactory.extractor.BuildInfoTask] on task set.

* Try:
Run with --info or --debug option to get more log output.

此外,当我删除与artifactory相关的所有代码并仅保留应用插件:'artifactory'时,我收到此错误:

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\OnRights_Workspace\GradleConfiguration\build.gradle' line: 86

* What went wrong:
A problem occurred evaluating root project 'GradleConfiguration'.
> Failed to apply plugin [id 'artifactory']
> Plugin with id 'artifactory' not found.

* Try:
Run with --info or --debug option to get more log output.

最佳答案

您的插件版本太旧。尝试使用最新的 ( 3.1.1 )。

关于eclipse - Gradle Artifactory 插件错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32072698/

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