nexus private server quick update index method

After simply setting up the nexus private server, do the basic configuration.

 

A little more troublesome is to let it update the Jar index file. If you are patient, you can do it by updating the index online, but it takes a long time, which makes people mistakenly think that something is wrong, and they are at a loss.

 

Here's a simple, feasible way to manually update the index file. 

 

Visit http://repo.maven.apache.org/maven2/.index/ to download the index file of the latest version of the central repository. In a long list, we need to download the following two files (usually at the end of the list)  

nexus-maven-repository-index.gz [nearly 300M size]

nexus-maven-repository-index.properties  

The following is to decompress the index file. Although the suffix is ​​gz, the decompression method is quite special. We need to download a jar package indexer-cli-5.1.1.jar. We need to decompress the index file through this special jar. 

Put the above three files (.gz & .properties & .jar) in the same directory and run the following command 

java -jar indexer-cli-5.1.1.jar -u nexus-maven-repository-index.gz -d indexer 

 

Check the nexus executable file and find that NEXUS_HOME="..", which is the directory where the home directory is located.

 

After waiting for the program to run, you can find that there are many files in the indexer folder, put these files in the {nexus-home}/sonatype-work/nexus/indexer/central-ctx directory, and restart nexus 

 

 

[A ten-year code farmer's thoughts, scan the code to follow to get more exciting content]

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326761645&siteId=291194637