我的本地系统中有一些jar文件,我想使用Gradle脚本发布,但到目前为止我找不到任何解决方案。 我能够发布我的构建生成的工件,但我想发布我本地系统中的jar。 我试图将这个工件声明为跟随但是它抛出了错误:
publishing {
publications {
mavenJava(MavenPublication) {
artifact projJar
//This is jar file other than my built file which I want to upload (there are same files more in number to be uploaded):
artifact 'D:/myworkspace/Test/LocalJar.jar'
artifact source: projJar, classifier: 'src', extension: 'jar'
}
}
repositories {
maven {
credentials {
username 'user'
password 'password'
}
url "http://IP:Port/repository/RepoName/"
}
}
}
错误消息是:
*What went wrong:
Execution failed for task:publishMavenJavaPublicationToMaven2Repository'.
> Failed to publish publication 'mavenJava' to repository 'maven2'
> Invalid publication 'mavenJava': multiple artifacts with the identical extension and classifier ('jar', 'null').
请指导我如何将我的本地jar文件发布到nexus存储库(我当地有很多文件要发布)