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

How does maven configure the local warehouse

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly introduces maven how to configure the local warehouse, the article is very detailed, has a certain reference value, interested friends must read it!

1. Download apache-maven-3.6.3-bin.zip

Then unpack it and put it on the local site (I put it on disk C and renamed it maven). Then create a new folder, named: maven-repository, as the local repository.

2. Configure environment variables

Add: maven_home to the system properties-environment variable-system variable, and the value is the location just named maven folder (mine is C:\ maven). Create a new column "% maven_home%\ bin\" at Path and click OK. This completes the configuration of the environment variables.

3. Testing

Open cmd and type mvn-v to verify that the relevant information is displayed.

As shown in the figure, it is successful.

4. Configure the local warehouse

Open the maven folder you just set up, find conf, and open settings.xml (I use notepad++ to open it here)

Find the localRepository as shown in the figure, and add the yellow line below, with the address of the maven warehouse set for you in the middle.

Then continue to add below:

Use Aliyun image to improve download speed. Save and close when the settings are complete.

5. Enter the command

Open cmd and enter the mvn help:system command to download the repository (I failed in this step and forgot the details. I don't have to worry about it. I will download it automatically later when I create the project, but it will be slow). Since then, the local warehouse has been created.

The above is all the contents of the article "how to configure the local warehouse in maven". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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