使用gradle向jcenter中心發(fā)布自己的jar

為了方便使用和管理自己平時積累的一些代碼,故學(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']

是因為module的名字和Model下gradle文件配置的artifact不一致導(dǎo)致的,修改一直便可

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

推薦閱讀更多精彩內(nèi)容