1. Nexus2 才支持通過網頁上傳文件,Nexus3不支持,只能通過命令行
2. 在 Maven 默認 settings.xml 添加如下配置:
1 <server> 2 <id>gs-releases</id> 3 <username>user</username> 4 <password>password</password> 5 </server>
3. 執行命令:
1 mvn deploy:deploy-file -DgroupId=[groupId] -DartifactId=[artifactId] -Dversion=[version] -Dpackaging=jar -Dfile=[文件路徑] -Durl=http://[ip]:[port]/repository/gs-releases/ -DrepositoryId=gs-releases
4. 好了
參考文章:
https://www.cnblogs.com/endv/p/11204704.html 使用Nexus3搭建Maven私服+上傳第三方jar包到本地maven倉庫
https://blog.csdn.net/xiaodaiwang/article/details/78093591 如何通過網頁方式將jar包上傳到nexus