1. Manual update
1. Download the index file
Download in http://repo.maven.apache.org/maven2/.index/
Nexus-maven-repository-index.gz
Nexus-maven-repository-index.properties
And then download a Indexer-cli-5.1.0.jar
Indexer: http://maven.outofmemory.cn/org.apache.maven.indexer/indexer-cli/5.1.0/
Indexer's Maven
12345 |
<
dependency
>
<
groupId
>org.apache.maven.indexer</
groupId
>
<
artifactId
>indexer-cli</
artifactId
>
<
version
>5.1.0</
version
>
</
dependency
>
|
The
2. extract the index file
will be the top three files (. gz & .properties & . JAR) to the same directory, run the following command
Java -jar indexer-cli-5.1.0.jar -u nexus-maven-repository-index.gz -d indexer
3. stop Nexus
4. Delete the original index file
will { All files under Nexus_home}\sonatype-work\nexus\indexer\central-ctx are deleted
5. copy Index to central-ctx directory
nexus-maven-repository-index.gz All files in the extracted indexer directory to Sonatype-work\nexus\indexer\central-ctx
6. automatically update the index when the Nexus is started
2. Automatic Download
1. Open the Repositories tab, select the remote warehouse and open the configuration, set download romote location to true;
2. Right-clicking the Update index,nexus on the remote warehouse will automatically create a task plan, the general remote warehouse is larger, the build will be more, the index file will be large, like http://repo1.maven.org/maven2 There are hundreds of M, so the time required is longer.
3. can enter scheduled tasks to view the execution of the task, and when execution completes, the index of the remote repository is already established.
two ways, as long as you see a lot of files after Browse_index, it means the update is successful
?
Nexus Update Index