我们最近将Jenkins Artifactory Plugin从3.4.1升级到3.5.0,当我们进行插件版本更新时,我们的管道代码开始出现错误。下面是我们发现的两个错误。我们需要帮助解决以下两个问题。根据发布说明,我认为这与以下变化有关:
. . gradle管道-支持定义快照和发布库。(hap - 1174)
4.用maven-publish插件替换gradle的maven插件。(hap - 1096)
问题:1当构建。Gradle包含maven-publish插件Gradle build fails with artifactory Gradle step。这似乎和//www.si-fil.com/jira/browse/HAP-1096.根据那张罚单,我们更新了架构。Gradle使用' maven-publish '插件,但我们仍然得到以下错误。此外,这是否意味着用户在他们的构建中定义了“maven”插件。Gradle,他们必须更新它使用' maven-publish '插件?
错误:FAILURE:生成失败,出现异常。无法获得未知属性'java'的SoftwareComponentInternal类型的集合org.gradle.api.internal.component.DefaultSoftwareComponentContainer。13:17:17
测试数据:
构建。Gradle:(即使只包含这一行)
应用插件:'maven-publish'
管道代码:
rtGradle = Artifactory.newGradleBuild()
rtGradle。usesPlugin = false
rtgradle .deploy . deploymavendescriptors = true
rtGradle.deployer.deployIvyDescriptors = false
rtGradle.deployer服务器:Artifactory.server("artifactory-test-server"), repo: "snapshot-local"
rtgradle .deploy . deployartifacts = false
rtGradle。useWrapper = true
rtGradle.run rootDir: ".", buildFile: "build. "Gradle ",开关:"——info",任务:"clean"
问题2:当使用rtGradle对象时,我们突然得到一个关于部署者应该定义“repo”或同时定义“snapshotRepo”和“releaseRepo”的错误。错误消息给人的印象是,我们仍然可以为rtGradle部署器设置“repo”,但仅仅设置“repo”仍然会给我们以下错误。
java.lang.Exception: java.io.IOException:部署器应该设置为'repo'或'releaseRepo'和'snapshotRepo'
管道代码:
rtGradle = Artifactory.newGradleBuild()
如果(cdAppProperties.usesGradlePlugin ? .toBoolean ())
其他的
{rtGradle。usesPlugin = false}rtgradle .deploy . deploymavendescriptors = true
rtGradle.deployer.deployIvyDescriptors = false
if (toBuildType == "CI")
{logger.info("Entered toBuildType CI") rtGradle.deployer server: server, repo: snapshotLocal.toString()}else if (toBuildType == "RELEASE")
{logger.info("Entered toBuildType RELEASE") rtGradle.deployer server: server, repo: releaseLocal.toString()}- 取决于
-
- 318的差距默认的MavenJava和IvyJava出版物添加到非Java项目中
- Resolved
A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">解决
- Resolved