為了方便使用和管理自己平時積累的一些代碼,故學(xué)習(xí)使用gradle插件發(fā)布自己的庫到j(luò)center,網(wǎng)上已經(jīng)有很多文章可供大家參考,推薦:http://www.lxweimin.com/p/789827a19c0c
記錄一下自己在發(fā)布過程中遇到的坑
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位置的參數(shù)與圖二中repo的參數(shù)不一致導(dǎo)致的,改為一直便可。
圖一.png
圖二.png
2. 如果上傳的過程中出現(xiàn)
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']