Once the nexus has been set up, due to network reasons, sometimes the index can not update the problem, here refer to a lot of information on the Internet, to give a way to update the index offline.
1. Download index file
Nexus-maven-repository-index.gz
Nexus-maven-repository-index.properties
2. Download the Unzip tool
The following is to extract the index file, although the suffix is gz, but the decompression method is very special, 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
Note: Indexer-cli-5.1.1.jar is a tool dedicated to parsing and publishing indexes.
3, cmd command decompression
Place the above three files (. gz &. Properties &. Jar) in the same directory, for example, I placed under the D:\index folder. Run the cmd command as follows:
A, positioning to the D:\index
D:
CD Index
B. Execute the decompression command
Java-jar indexer-cli-5.1.1.jar-u nexus-maven-repository-index.gz-d Indexer
After that, will automatically generate a indexer folder in the D:\index, about more than 10 minutes, the cmd command is completed, the indexer file size will reach 700M multipoint, and then the indexer files are copied to the "nexus-home}/" Sonatype-work/nexus/indexer/central-ctx directory, reboot Nexus, index update complete!
GXPT Environment Construction--Nexus Update index (III)