Maven project deploy to Nexus

    使用Maven管理項目須要管理本身的依賴,如支付寶,微信等支付或者短信接口等組件,未在maven repository發佈,這時,咱們須要構建本身的私服,將這些組件發佈並經過dependency節點進行依賴管理。首先咱們須要在nexus新建hosted repository,而後經過微信

  0.  nexus的upload功能進行上傳
maven

  1. 經過maven提供deployurl

  在pom.xml中添加:
code

<distributionManagement>
    <repository>
        <id>xxoo</id>
        <url>http://IP:port/nexus/content/repositories/xxoo</url>
    </repository>
</distributionManagement>

  在maven的settings中添加:server

<servers>
    <server>
        <id>xxoo</id>
        <username>deployment</username>
        <password>your_pwd</password>
    </server>
</servers>


  memo:要在repository configuration中配置allow deployxml

相關文章
相關標籤/搜索