【问题标题】:gradle task uploadArchives does not workgradle 任务上传存档不起作用
【发布时间】:2013-12-30 15:54:12
【问题描述】:

我有一个从 jenkins 执行的 gradle 项目,它应该只从存储库中检出现有库并将它们上传到工件。结帐工作成功,但执行 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 {
  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'
}

有什么问题?

谢谢

【问题讨论】:

    标签: jenkins gradle artifactory


    【解决方案1】:

    该信息需要进入artifacts { ... },而不是uploadArchives { ... }

    【讨论】:

      猜你喜欢
      • 2013-07-10
      • 2016-11-08
      • 1970-01-01
      • 2019-12-13
      • 2023-03-31
      • 2020-04-06
      • 1970-01-01
      • 1970-01-01
      • 2014-01-31
      相关资源
      最近更新 更多