我正在尝试压缩一些东西并上传Maven Local存储库。我试图重命名它,然后再上传到Maven存储库。这就是我在做什么。
我创建了用于Zippin和复制的Gradle任务。发布取决于要完成的复制。当我进入本地Maven存储库并进行检查时,看不到更新的文件名。
task buildExternalConfig1(type: Zip) {
archiveFileName = "test-archive.zip"
from processResources
}
task copymavenZip1(type: Copy) {
from("/Users/temp/Documents/my_hell/project/backend/build/distributions") {
include 'test-archive.zip'
rename 'test-archive.zip', "madison.zip"
}
into ("/Users/temp/Documents/my_hell/project/backend/build/distributions")
}
publishing {
publications {
mavenZip1(MavenPublication) {
artifact buildExternalConfig1
artifactId "abc"
group "def"
version "24.5"
}
}
}
publishMavenZip1PublicationToMavenLocal.dependsOn copymavenZip1