Get the App
SLTechnology News&Howtos  ›  Development  › 

How does maven configure the local warehouse

Shulou Source: shulou.com Published: 2022-06-03 13:50:11 11月14日 Update

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!

Tags: Warehouse configuration variables files folders environment input content command article system speed such as figure success one line no value location information interest Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology NVidia Shulou Information Shulou Tech Info Huawei