Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the method of building maven by nexus?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "what is the method of nexus building maven". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the method of nexus to build maven".

Installation

1. Download the installation package.

Download address: https://www.sonatype.com/download-oss-sonatype

Select the windows installation package to download.

two。 After downloading and decompressing, you get two folders: nexus-3.14.0-04 and sonatype-work.

Nexus-3.14.0-04 is the installation directory that contains the nexus application and all the dependent components needed to run nexus.

Sonatype-work is a data directory that contains all repositories, components, and other data managed by nexus.

3. Cmd, enter the nexus-3.14.0-04/bin directory and execute nexus.exe / run. As follows:

When the following appears in the console, the service starts successfully.

4. Enter the address: http://localhost:8081/ to enter the interface.

Add Aliyun maven Agent

1. After the program is installed, admin/admin123, click sign in and log in.

two。 Click the settings button to go to the settings page. The position of the button is shown below.

3. Click the left menu Repository > Repositories, and then click the Create repositoty button. As follows:

4. Select maven2 (proxy), as follows:

5. Fill in the name of the proxy library and the url of the upper library you are proxying. Aliyun url is: http://maven.aliyun.com/nexus/content/groups/public/

6. Click the Create repositoty button. View the newly created proxy library.

7. Reconfigure the maven-public group to include the newly created aliyun-maven. On the above page, click maven-public to go to the configuration page. Follow the figure below to make the changes. Move the aliyun-maven to the right and up to the first place. Then click Save.

8. Click the menu Repositoty > Repositories on the left to go to the warehouse list page, click the copy button on the maven-public line, and then copy the pop-up url, which you need to use when configuring maven.

Configure the maven client to use the newly created private server

1. Open the file C:\ Users\ {username}\ .m2\ settings.xml, and if you don't have it, copy one from the installation directory of maven (for example: e:/apache-maven-3.5.3/conf/settings.xml). Add the following under the mirrors element:

MyRepository

MyRepository

Http://localhost:8081/repository/maven-public/

Central

Id/name can be modified by itself, and url is the url copied in the above process. Using this url includes all the repositories in the maven-public.

Thank you for your reading, the above is the content of "what is the method for nexus to build maven". After the study of this article, I believe you have a deeper understanding of what is the method for nexus to build maven, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report