構件打包發佈到遠程倉庫時注意配置

將構件打包發佈到遠程倉庫時注意配置問題


一個是本地的setting.xml中一定要配置相應的server,包括用戶名密碼和server id(這個特別注意後面會提到)

<servers>  

 <server>  
<id>nexus-releases</id>  
<username>admin</username>  
<password>llq</password>  
 </server>  
 <server>  
<id>nexus-snapshots</id>  
<username>admin</username>  

<password>llq</password>  

 </server>    

另一個構件的pom.xml中 repository的id與上面的server 的id對應上包括releases 和 snapshots

<distributionManagement>
    <repository>
      <id>nexus-releases</id>
      <name>Nexus Release Repository</name>
      <url>http://172.16.60.71:8081/nexus/content/repositories/releases/</url>
    </repository>
    <snapshotRepository>
      <id>nexus-snapshots</id>
      <name>Nexus Snapshot Repository</name>
      <url>http://172.16.60.71:8081/nexus/content/repositories/snapshots/</url>
    </snapshotRepository>
  </distributionManagement>


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章