小编Mäū*_*nas的帖子

Gradle Artifactory发布错误

我正在使用Gradle和Artifactory,我使用的示例在此示例站点中无法正常工作我有以下错误消息:

Extension of type 'PublishingExtension' does not exist. Currently registered extension types: [DefaultExtraPropert iesExtension, DefaultArtifactPublicationSet_Decorated, ReportingExtension_Decorated, DefaultProjectComponentContai ner_Decorated, DefaultProjectSourceSet_Decorated, DefaultBinaryContainer_Decorated]
Run Code Online (Sandbox Code Playgroud)

我在这行中有错误:

defaults{
    publications ('mavenJava')
}
Run Code Online (Sandbox Code Playgroud)

有人可以帮我解决这个问题,我长期坚持这个问题.

在查看JBaruch建议的链接并与代码进行比较后,我更改了插件,但仍然是同样的问题.也许我在混淆什么?(这就是我发布完整源代码的原因)

buildscript {
    repositories {
        maven {
            url 'http://.../artifactory/libs-release'
            credentials {
                username = "${artifactory_user}"
                password = "${artifactory_password}"
            }
            name = "maven-main-cache"
        }
    }
    dependencies {
        classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.0.1"
    }
}

apply plugin: 'scala'
apply plugin: 'maven-publish'
apply plugin: "com.jfrog.artifactory"

version = '1.0.0-SNAPSHOT'
group = 'com.buransky'

repositories {
    add buildscript.repositories.getByName("maven-main-cache")
}

dependencies {
    compile …
Run Code Online (Sandbox Code Playgroud)

artifactory gradle

14
推荐指数
1
解决办法
5141
查看次数

标签 统计

artifactory ×1

gradle ×1