我在Gradle论坛Gradle can not find existing artifact?上发布了相同的问题。
Gradle v4.10.2
这真的让我感到困扰,因为我知道它应该可以工作,而且我感觉自己正在正确设置build.gradle文件。
我构建了一个插件并将其部署到我们的AWS S3 Maven存储库中。
当我运行Gradle命令(例如./gradlew clean
)时,我得到了
这是我的build.gradle
文件
buildscript {
repositories {
maven {
url s3_bucket
credentials(AwsCredentials) {
accessKey AWS_ACCESS_KEY
accessKey AWS_SECRET_KEY
}
}
}
dependencies {
classpath "com.zift.utilities:zift-version-plugin:0.0.1"
}
}
plugins {
id 'java'
id 'maven'
id 'maven-publish'
id 'java-gradle-plugin'
}
version = '0.0.1'
jar {
manifest {
attributes 'artifactId': project.artifactId,
'groupId': project.groupId,
'version': project.version
}
baseName artifactId
doLast {
println "artifactId: $project.artifactId\ngroupId: $project.groupId\nversion: $version"
}
}
如果我注释掉classpath
行(有问题的行),我会得到
$ ./gradlew build
> Task :jar
:jar: No valid plugin descriptors were found in META-INF/gradle-plugins
artifactId: zift-version-plugin
groupId: com.zift.utilities
version: 0.0.1
我想念什么?