【问题标题】:Artifactory Plugin seems to ignore publishPom = falseArtifactory Plugin 似乎忽略了 publishPom = false
【发布时间】:2018-05-15 02:52:53
【问题描述】:

我有以下基本发布代码。

buildscript {
    repositories {
        maven {
            url "${artifactory_contextUrl}/plugins-release"
            credentials {
                username = "${artifactory_user}"
                password = "${artifactory_password}"
            }
        }
    }
    dependencies {
        classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4+"
    }
}

allprojects {
    apply plugin: "com.jfrog.artifactory"
    apply plugin: 'maven'
    apply plugin: 'maven-publish'
}

artifactory {
    contextUrl = "${artifactory_contextUrl}"
    publish {
        repository {
            repoKey = "${publish_repository_key}"
            username = "${artifactory_user}"
            password = "${artifactory_password}"
            maven = true
        }
    }
    resolve {
        repository {
            repoKey = "${resolve_repository_key}"
            username = "${artifactory_user}"
            password = "${artifactory_password}"
            maven = true
        }
    }
    clientConfig.timeout = 10
}

publishing {
    publications {
        mavenJava(MavenPublication) {
            artifact 'test-1.1/abc-1.1.py'
            version "1.5"
            groupId "com.example"
            artifactId "script"
        }
    }
}

artifactoryPublish {
    publications ('mavenJava')
    publishBuildInfo = false
    publishArtifacts = false
    publishPom = false
    publishIvy = false
}

对于测试,我不想发布 BuildInfo 和 Pom。尽管事实上所有发布都设置为错误调用

gradle clean generatePomFileForMavenJavaPublication artifactoryPublish

并观察 http 流量和控制台输出确认所有上传仍在进行中。

Deploying artifact: https://artifactory/publish_repository_key/com/example/script/1.5/script-1.5.py
Deploying artifact: https://artifactory/publish_repository_key/com/example/script/1.5/script-1.5.pom
Error occurred for request PUT /publish_repository_key/com/example/script/1.5/script-1.5.pom.sha1;build.name=script;build.number=1512095807403 HTTP/1.1: Read timed out.

此外,最后一个错误完全让我感到困惑。

【问题讨论】:

    标签: gradle build.gradle artifactory


    【解决方案1】:

    它看起来像一个错误。欢迎关注here。修复后我会更新这个答案。

    【讨论】:

    • 我刚刚用最新的 Artifactory 插件版本测试了这个(classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '4. +')) 并且功能似乎按预期工作。会不会是您使用的是旧版本的插件?
    • 仍然损坏 - 即使 GitHub 问题中的解决方法对我也不起作用
    猜你喜欢
    • 2021-10-28
    • 2016-09-30
    • 2016-03-16
    • 2014-02-03
    • 2012-03-11
    • 2013-09-07
    • 2016-08-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多