The Nexus can update the Central Warehouse index online, but the update is slow, and it is likely that the downloaded index is not complete. Here's a quick and reliable way to update a central warehouse index offline.
1, access the http://repo.maven.apache.org/maven2/.index/Download Center warehouse The latest version of the index file, We need to download the following two files nexus-maven-repository-index.gz and nexus-maven-repository-index.properties.
2, we need to download a jar package Indexer-cli-5.1.1.jar, we need to use this special jar to extract the index file. You can search for downloads from the http://mvnrepository.com/website.
3. Put three files in the same directory.
CMD enter the corresponding directory to execute the following command.
Java-jar indexer-cli-5.1.1.jar-u nexus-maven-repository-index.gz-d Indexer
Please wait patiently, the decompression process is about 10 minutes.
4, wait for the program to run after you can find a lot of files in the indexer folder, empty the {nexus-home}/sonatype-work/nexus/indexer/central-ctx directory, copy the generated files to the above directory, Restart the Nexus to see the Offline Update index successful.
Original Blog Address: http://blog.csdn.net/shawyeok/article/details/23564681