為了方便使用和管理自己平時積累的一些代碼,故學習使用gradle插件發布自己的庫到jcenter,網上已經有很多文章可供大家參考,推薦:http://www.lxweimin.com/p/789827a19c0c
記錄一下自己在發布過程中遇到的坑
1. Error:Execution failed for task ':commonUtils:bintrayUpload'.
Could not create package 'yunhui/maven/commonUtils': HTTP/1.1 404 Not Found [message:Repo 'maven' was not found]
這是由于下面圖一中name位置的參數與圖二中repo的參數不一致導致的,改為一直便可。
圖一.png
圖二.png
2. 如果上傳的過程中出現
Could not upload to 'https://xxxxxxx.pom': HTTP/1.1 400 Bad Request [message:Unable to upload files: Maven group, artifact or version defined in the pom file do not match the file path 'xxxxxxx.pom']