乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      maven下nexus的搭建,jar包上傳等注意事項(xiàng)

       干掉熊貓,我就是國寶 2011-09-14

      nexus是用來搭建本地jar包服務(wù)器到,具體就不多說了。
      主要是參考裡下面到帖子。在此感謝作者。

      持續(xù)集成之路——搭建Maven私服

      Maven倉庫管理-Nexus(轉(zhuǎn)帖後加強(qiáng)版)

      nexus的安裝

      1.nexus的下載地址

      http://nexus./downloads/
      我下載的是nexus-oss-webapp-1.8.0-bundle.tar.gz

      解壓後得到2個(gè)文件:nexus-oss-webapp-1.8.0 和sonatype-work
      前者包含了nexus的運(yùn)行環(huán)境和應(yīng)用程序,後者包含了你自己的配置和數(shù)據(jù)。

      2.啟動(dòng)nexus

      在上面提到,nexus的運(yùn)行環(huán)境在nexus-oss-webapp-1.8.0目錄,下面就進(jìn)入這個(gè)目錄啟動(dòng):

      Linux代碼  收藏代碼
      1. # cd nexus-oss-webapp-1.8.0/bin/jsw/linux-x86-32/   



      在這個(gè)目錄下包含了一個(gè)文件夾和三個(gè)文件:lib、nexus、platform和wrapper,其中nexus就是啟動(dòng)命令。

      執(zhí)行

      Linxu代碼  收藏代碼
      1. # ./nexus   


      得到nexus到提示命令  如start,stop,status,restart 等。

      輸入

      Linux代碼  收藏代碼
      1. # ./nexus start   



      終端出現(xiàn)

      Linux代碼  收藏代碼
      1. Starting Nexus OSS...  
      2. tarted Nexus OSS   


      說明nexus啟動(dòng)成功

      注意:jsw文件夾下有很多針對(duì)不同操作系統(tǒng)到文件夾,選中適合自己操作系統(tǒng)的文件夾。
      也可以把start,stop做成腳本放在桌面上,避免不停的cd
      附件為start和stop的腳本,請(qǐng)打開腳本修改自己本機(jī)上nexus的路徑。

      3.打開nexus

      在瀏覽器中訪問: http://localhost:8081/nexus

      出現(xiàn)


      點(diǎn)擊右上角的login in
      輸入帳號(hào):admin
      輸入密碼:admin123
      登錄成功

      配置nexus


      由於在新搭建的nexus環(huán)境中只是一個(gè)空的倉庫,所以第一步就是要和遠(yuǎn)程的Maven中心倉庫進(jìn)行同步。





      如果在Reindex之後,並沒有同步到遠(yuǎn)程的倉庫,可以檢查每個(gè)倉庫的設(shè)置。下面是Maven Central的設(shè)置:





      開打maven目錄-> conf -> settings.xml

      找到localRepository
      上面到註釋信息寫道:Default: ~/.m2/repository
      我們可以添加

      Java代碼  收藏代碼
      1. <localRepository>${M3_HOME}/repository</localRepository>   



      ${M3_HOME}是maven到安裝路徑,新建個(gè)repository文件夾用來裝入本地的jar包

      順手把以前默認(rèn)的repository刪除。

      Linux代碼  收藏代碼
      1. #cd ~  
      2. rm -rf .m2   



      依次在settings.xml文件裡輸入

      Xml代碼  收藏代碼
      1.  <!-- nexus帳號(hào)和密碼-->  
      2.   
      3.    <server>    
      4.      <id>nexus-releases</id>    
      5.      <username>admin</username>    
      6.      <password>admin123</password>    
      7.    </server>    
      8.    <server>    
      9.      <id>nexus-snapshots</id>    
      10.      <username>admin</username>    
      11.      <password>admin123</password>    
      12.    </server>       
      13.  </servers>    
      14.   
      15. ...  
      16.   
      17. <!-- 引用naxus倉庫組-->  
      18.    <profile>  
      19.        <id>dev</id>  
      20.           <repositories>  
      21.              <repository>  
      22.                  <id>nexus</id>  
      23.                  <url>http://127.0.0.1:8081/nexus/content/groups/public/</url>  
      24.                  <releases>  
      25.                     <enabled>true</enabled>  
      26.                  </releases>  
      27.                  <snapshots>  
      28.                     <enabled>true</enabled>  
      29.                  </snapshots>  
      30.               </repository>  
      31.             </repositories>             
      32.             <pluginRepositories>  
      33.                 <pluginRepository>  
      34.                     <id>nexus</id>  
      35.                     <url>http://127.0.0.1:8081/nexus/content/groups/public</url>  
      36.                     <releases>  
      37.                         <enabled>true</enabled>  
      38.                     </releases>  
      39.                     <snapshots>  
      40.                         <enabled>true</enabled>  
      41.                     </snapshots>  
      42.                 </pluginRepository>  
      43.             </pluginRepositories>  
      44.         </profile>  
      45. ..  
      46.   
      47.  <!-- nexus -->  
      48.   <activeProfiles>  
      49.         <activeProfile>dev</activeProfile>  
      50.   
      51.     </activeProfiles>   


      注意:根據(jù)標(biāo)籤位置準(zhǔn)確輸入

      上傳jar到本地倉庫





      選中3rd party 點(diǎn)擊Artifact Upload標(biāo)籤點(diǎn)擊select artifact(s) 按鈕選擇要上傳到j(luò)ar包然後再add artiffact -> uplaod artiffact 即可。

      編輯pom.xml的時(shí)候可能找不到在nexus的jar包
      <br />

      在nexus裡查詢本地上傳的jar包複製xml代碼到pom.xml文件保存即可。

      編輯好pom.xml後保存
      完畢後在${M3_HOME}/repository 文件裡可看到導(dǎo)入的jar包。

        本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評(píng)論

        發(fā)表

        請(qǐng)遵守用戶 評(píng)論公約

        類似文章 更多