知乎專欄 | 多維度架構 | | | 微信號 netkiller-ebook | | | QQ群:128659835 請註明“讀者” |
通過訪問 http://localhost:8081/artifactory/ ,用預設管理員賬號密碼(用戶名:admin,密碼:password ) 登錄,進入管理界面體驗 Artifactory。
buildscript { repositories { maven { url "http://artifactory.netkiller.cn:8081/artifactory/libs-release-local" } jcenter() } dependencies { ... } } allprojects { repositories { maven { url "http://artifactory.netkiller.cn:8081/artifactory/libs-release-local" } jcenter() } }
Artifactory 預設將 jecnter 庫緩存到私有 maven倉庫中。我們可以在項目中配置 jcenter 倉庫信息列表,後續編譯所需要的包都直接從私服 maven倉庫讀取,加快項目編譯速度。
buildscript { repositories { maven { url "http://artifactory.netkiller.cn:8081/artifactory/jcenter" // 配置私服jcenter倉庫信息 } maven { url "http://artifactory.netkiller.cn:8081/artifactory/libs-release-local" } jcenter() } dependencies { ... } } allprojects { repositories { maven { url "http://artifactory.netkiller.cn:8081/artifactory/jcenter" // 配置私服jcenter倉庫信息 } maven { url "http://artifactory.netkiller.cn:8081/artifactory/libs-release-local" } jcenter() } }