nexus更新Central倉庫索引

一:自動更新


選中central,configuration,將Remote Storage Location(代理地址)設置爲:https://repo1.maven.org/maven2/,將Download Remote Indexes設置爲true

右鍵central,選擇最後一項“update index”,優點是操作簡單,不過速度會有點慢。


二:手動更新

從https://repo1.maven.org/maven2/.index/下載

nexus-maven-repository-index.gznexus-maven-repository-index.properties
從https://repo1.maven.org/maven2/org/apache/maven/indexer/indexer-cli/5.1.1/
下載indexer-cli-5.1.1.jar
將三個文件放在同一目錄,執行如下命令java -jar indexer-cli-5.1.1.jar -u nexus-maven-repository-index.gz -d indexer,
此時會生成一個indexer文件夾,待執行完後,將nexus安裝目錄\nexus2\sonatype-work\nexus\indexer\central-ctx中的內容全部刪除,
並把生成的indexer的內容複製到..\central-ctx中。重啓nexus就可以看到更新後的索引了

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