Nexus download remote Maven repository Index

Source: Internet
Author: User

During the development process, you often only remember a build name, but do not remember its specific configuration information and available versions. In this case, you can use the nexus build search function to query the applicable build; the premise of building a search is that an index has been created in the repository. If no index is created or the index does not exist, the building information cannot be searched. Nexus does not download the index of the remote repository by default, to search for a build in a remote repository in Nexus, you must first download the index of the remote repository. If a component cannot be found through nexus, it indicates that the component is not in the repository registered by nexus. You may need to add an additional agent repository or manually upload a component.

 

To download an index, follow these steps:

1. Open the Repositories tag, select the remote repository, Open Configuration, and set Download Romote Location to true;

2. Right-click the remote warehouse and select Update Index. Nexus automatically creates a task plan. Generally, the remote warehouse is large, and there will be a large number of Index files, such as http://repo1.maven.org/maven2/there are several hundred MNS.

You can go to Scheduled Tasks to view the execution status of the task. When the execution is complete, the index of the remote repository has been created.

3. Try the Artifact Search function to see if the building information in the remote repository can be queried.

 

 

If this method cannot be used successfully, you can check the log to see the specific cause, which may be a connection problem. For connection problems, use the following method:

1. download the following two files in other ways:
Http://repo1.maven.org/maven2/.index/nexus-maven-repository-index.properties
Http://repo1.maven.org/maven2/.index/nexus-maven-repository-index.gz

2. Find an Apache Tomcat server and create a/maven2/under its ROOT directory /. index virtual directory (Note: if you are using an XP system, you may not be able to establish it. index folder. Use mkdir in cmd.

Command can be created), copy the above two files to this directory; Modify Tomcat service port to 80.

3. Edit the c: \ WINDOWS \ system32 \ drivers \ etc \ hosts file and add the following to the file:
127.0.0.1 repo1.maven.org
Note: 127.0.0.1 is the IP address of the Apache Tomcat server in step 2.

4. log on to Nexus and right-click the remote warehouse and choose Update Index.

5. Remove the content previously added to the hosts file.

Maven details: click here
Maven: click here

Maven 3.1.0 release, Project Build Tool

Install Maven in Linux

Maven3.0 configuration and simple use

Set up sun-jdk and Maven2 in Ubuntu

Get started with Maven

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.