gpt4 book ai didi

Gradle Artifactory 发布错误

转载 作者:行者123 更新时间:2023-12-03 22:25:43 24 4
gpt4 key购买 nike

我是 Gradle 和 Artifactory 的新手,我使用了一个无法正常工作的示例 example site我有这个错误信息:

Extension of type 'PublishingExtension' does not exist. Currently registered extension types: [DefaultExtraPropert iesExtension, DefaultArtifactPublicationSet_Decorated, ReportingExtension_Decorated, DefaultProjectComponentContai ner_Decorated, DefaultProjectSourceSet_Decorated, DefaultBinaryContainer_Decorated]

我在这一行有一个错误:
defaults{
publications ('mavenJava')
}

有人可以帮助我解决这个问题我已经被困在这个问题上很长时间了。

在查看 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 'org.scala-lang:scala-library:2.11.2'
}

tasks.withType(ScalaCompile) {
scalaCompileOptions.useAnt = false
}

artifactory {
contextUrl = "${artifactory_contextUrl}"
publish {
repository {
repoKey = 'libs-snapshot-local'
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true

}
defaults{
publications ('mavenJava')
}
}
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}

非常感谢

最佳答案

您没有申请 maven-publish预计与 artifactory 一起出现的插件插入。

请看the documentation , 还有 this answer可能会有所帮助(注意插件名称已更改)。

关于Gradle Artifactory 发布错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28585727/

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