1. 程式人生 > >nexus 離線更新索引

nexus 離線更新索引

pan sonatype ava repo earch home repos 下載 r文件

1、到http://repo.maven.apache.org/maven2/.index/頁面下載下面這兩個文件:
  nexus-maven-repository-index.gz
  nexus-maven-repository-index.properties

2、到http://search.maven.org,搜索g:"org.apache.maven.indexer" AND a:"indexer-cli"下載特定解壓文
  nexus-maven-repository-index.gz

3、把這幾個文件放在同一個文件路徑下面,從cmd進入到這個路徑裏,輸入命令:
  $ java -jar indexer-cli-5.1.1.jar -u nexus-maven-repository-index.gz -d indexer

4、執行完之後,把indexer文件夾下的所有內容都復制到%nexus-home%\sonatype-work\nexus\indexer\central-ctx下面。
  重新啟動nexus,進入管理界面,選擇central->Browse Index,就看到更新的索引了。
  註意:nexus是需要重新啟動的,我是在做上面的所有步驟之前,先停掉nexus,等上面四個步驟完成之後,再啟動nexus的。

如果網速慢,可下載打包附件

nexus 離線更新索引