Nexus Getting Started Guide

Source: Internet
Author: User
Tags maven central


Nexus Introduction

Nexus is the maven Repository Manager. If you use Maven, you can download the required components (artifact) from the maven central repository. However, this is generally not a good practice, you should set up a Maven repository server locally and maintain the local repository while maintaining the remote repository as a proxy to save bandwidth and time. nexus can meet this requirement. In addition, he provides powerful warehouse management and component search functions. It is based on rest, and the friendly UI is an extjs rest client, which occupies less memory, based on a simple file system rather than a database. These advantages have increasingly become the most popular Maven Repository Manager.


Proxy Maven central repository

Click repositories in the left-side Navigation Pane. the main panel of the interface displays a list of all the repositories and warehouse groups. You can see that their type field values include group, hosted, proxy, and virtual. Here we do not care about virtual. We only introduce the other three types:

  • Hosted, a local repository. We usually deploy our own components to this type of repository.

  • Proxy, which is used to represent a remote public repository, such as a Maven central repository.

  • A repository group is used to merge multiple hosted/Proxy repositories. We usually configure Maven dependency repository groups.


  • Manage local Maven Repositories
  • Nexus predefines three local warehouses: releases, snapshots, and 3rd party. Each of these three warehouses has a specific purpose. Releases is used to deploy our own release components, snapshots is used to deploy our own snapshot components, and 3rd party is used to deploy third-party components. some components, such as the JDBC driver of Oracle, we can't download it from a public repository, so we need to deploy it to our own repository.

  • Of course, you can also create your own local repository. The procedure is similar to creating a proxy repository. Click Add at the top of the Repository panel and select hosted repository, enter the ID and name in the configuration panel below. Note that you do not need to enter the remote repository address here. The repository type is the hosted that cannot be modified, and the repository policy, you can select release or snapshot as needed,

Manage Maven repository groups

The concept of repository group in nexus is not available in maven. In Maven's opinion, whether you are hosted or proxy or group, it is the same for me. I just follow the groupid, artifactid, version, and other information to ask you for components. To facilitate Maven configuration, nexus can combine multiple repositories, hosted, or proxy into one group. In this way, Maven only needs to depend on one group, you can use all the repository content contained in the group.

Nexus predefines the "Public repositories" and "public snapshot repositories" warehouse groups. The former merges all pre-defined release warehouses by default, and the latter merges all pre-defined snapshot warehouses by default. In the previous section, we created a repository named "sonatype repository" and now merged it into "Public repositories.


Nexus Getting Started Guide

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.