Artifactory插件似乎忽略了publishPom = false

时间:2017-12-01 02:54:58

标签: gradle build.gradle artifactory

我有以下基本发布代码。

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.

另外,上次错误完全让我困惑。

1 个答案:

答案 0 :(得分:0)

它看起来像一个bug。随意关注here。一旦修复,我会更新这个答案。