我有一个从jenkins执行的gradle项目,它应该只从存储库中检出现有的库并将它们上传到artifactory。结帐工作成功,但执行uploadArchives会抛出MissingMethodException:
Caused by: org.gradle.api.internal.MissingMethodException: Could not find method archives() for arguments [{file=/var/lib/jenkins/jobs/Libs/workspace/libphonenumber.jar, name=libphonenumber, type=jar}] on root project 'workspace'.
uploadArchives:
uploadArchives {
println "I'm here: uploadArchives"
archives file: file('libphonenumber-5.7.jar'), name: 'libphonenumber', type: 'jar'
archives file: file('log4j-1.2.17.jar'), name: 'log4j', type: 'jar'
}
有什么问题?
由于
答案 0 :(得分:1)
该信息需要进入artifacts { ... }
,而不是进入uploadArchives { ... }
。