[Exception] IDEA prompts Maven to report an error, Blocked mirror for repositories: [nexus (http://xxxxx, default , releases+snapshot

1. Error content

When executing the Maven build, the following error occurred
Blocked mirror for repositories: [nexus (http://xxxxx, default , releases+snapshots)]
insert image description here

2. Error description

The reason for this problem is due to the mandatory requirements of the latest version of Maven. When executing mvn package, the latest version of Maven will block (Block) all HTTP protocol warehouse repositories, only support https, and the newly imported project project The configured Nexus warehouse is also an external package of the company's internal package/non-https address, that is, the company's internal Nexus warehouse repositories do not use https, so this error occurs.

3. Solutions

3.1 Upgrade Nexus warehouse repositories to https

This is the solution given by the official website.
Because the Nexus central warehouse is used in multiple projects, it needs to consider a wide range of aspects and needs to be carefully upgraded.

3.2 Reduce the default Maven version in IDEA (best solution)

Because I am using the latest 2023.1 version of IDEA, the default is 3.8.1,
so it can be reduced to Maven version to 3.6.3, which can support http.
Consider manually installing the old version (below 3.6) of maven, just use the old version to import.

insert image description here

3.3 Change to IDEA of lower version 2021

Directly set the mvn version of IDEA to the default version.
The latest version of IDEA 2021 has built-in maven 3.6.3, which can support http.

Guess you like

Origin blog.csdn.net/wstever/article/details/130265052