1、如何上传包至私服?**

    • 找maven私服管理员申请上传私服权限
    • 更改本地maven私服配置文件,详见链接
    • 更改本地maven私服配置文件中的 <servers></**servers>**节点

      1. <servers>
      2. <server>
      3. <id>highzap-public</id>
      4. <username>xxxx</username>
      5. <password>xxxx</password>
      6. </server>
      7. <server>
      8. <id>highzap-private-Release</id>
      9. <username>xxxx</username>
      10. <password>xxxx</password>
      11. </server>
      12. <server>
      13. <id>highzap-private-Snapshot</id>
      14. <username>xxxx</username>
      15. <password>xxxx</password>
      16. </server>
      17. <server>
      18. <id>highzap-profile</id>
      19. <username>xxxx</username>
      20. <password>xxxx</password>
      21. </server>
      22. </servers>
    • pom文件中新增以下节点(如果不在公司,请将注释的外网地址打开即可)

      1. <distributionManagement>
      2. <!-- 部署至maven私服 -->
      3. <repository>
      4. <id>highzap-private-Release</id>
      5. <name>highzap-private-Release</name>
      6. <url>http://demo.highzap.com:8081/repository/highzap-private-Release/</url>
      7. </repository>
      8. <snapshotRepository>
      9. <id>highzap-private-Snapshot</id>
      10. <name>highzap-private-Snapshot</name>
      11. <url>http://demo.highzap.com:8081/repository/highzap-private-Snapshot/</url>
      12. </snapshotRepository>
      13. </distributionManagement>
    • 执行部署

    部署方式一(命令行):

    1. mvn deploy

    部署方式二(idea操作):
    image.png