nexus下载安装和创建maven私库
一、下載安裝
1、下載:https://www.sonatype.com/download-oss-sonatype
解壓后可以看到,nexus安裝文件目錄,和work工作目錄。
2、打開命令行cmd,切換到nexus-3.2.1-01/bin目錄下,例如 cd D:\dev\nexus-3.18.1-01-win64\nexus-3.18.1-01\bin
執行命令 nexus.exe /run 回車,等待執行完畢。
3、測試是否正確安裝 :打開瀏覽器,輸入:localhost:8081,完成。
二、建立maven私庫
1、再nexus的Repositories建立新的repository(meng_mv2),并且Hosted 中 Controls if deployments of and updates to artifacts are allowed:Allow redeploy
2、下載安裝maven,再maven的settings中設置server
meng_mv2
admin
admin
3、(單個上傳jar包方法)創建maven的私庫目錄(D:\workspace\nexusMavenRepository),在目錄下加入一個測試jar包(commons-lang-2.1.jar),進入cmd,執行:
D:\workspace\nexusMavenRepository ->mvn deploy:deploy-file -DgroupId=com.meng_mv2 -DartifactId=hibernate -Dversion=1.24 -Dpackaging=jar -Dfile=D:\workspace\nexusMavenRepository\commons-lang-2.1.jar -Durl=http://localhost:8081/repository/meng_mv2/ -DrepositoryId=meng_mv2
三、將本地倉庫遷移到私庫
1、下載本地倉庫遷移工具migrate-local-repo-tool.jar
下載地址:https://pan.baidu.com/s/1AdhcSzFcTVbHM0CTbMgDgw 提取碼:saps
2、運行該遷移工具(請確保您的JDK版本為1.8及以上)
總結
以上是生活随笔為你收集整理的nexus下载安装和创建maven私库的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: click js自动点击 vue_vue
- 下一篇: 二分排序