The problem that maven dependency cannot be downloaded automatically

1. First, refresh the two positions on the map, and then merge ...

 

Then follow the instructions on the blog to find Settings-> Build, Execution, Deployment-> Build Tools-> Maven-> Ignored Files 

As shown below:

 

However, this is still not helpful to me, but I still have to record it, and thank this blogger brother !!!

Original address: https://blog.csdn.net/qq_35981283/article/details/73928035

 

2. After that, I found some more about configuration, Settings-> Build, Execution, Deployment-> Build Tools-> Maven-> Importing, as shown below:

 

However ... there is still no use of eggs ... At this step, I found that the settings are all set. Although these settings did not solve my problem, I still have to record it. Maybe someone will cause the setting problem. The dependent package cannot be downloaded ...

 

3. The key is coming, this time I found another blog that completely solved my problem. Right-click on the Maven project, the operation is as follows:

 

Click Open'settings.xml '. At the beginning, this location is Create' settings.xml '. After opening, add a mirror server in it:

 

Then, I re-imported according to the front-end method, and the dependent packages finally started to download !!! Nei Niu is full of faces ... Maybe everyone has set it up, but still have to record it, after all, it really solved me With a code:

======================== Dazzling intentional divider ================== ======

(2020.04.09 to make up: there are big guys in the comment area discussing that it is not easy to use http in the url (that is, the problem of not downloading or slow downloading), so here can be replaced with https to try ~) (this is a bit important) (Look at me) (~~~~~)

<mirrors>
<mirror>
<id>nexus</id>
<name>internal nexus repository</name>
<!-- <url>http://192.168.1.100:8081/nexus/content/groups/public/</url>-->
<url>http://repo.maven.apache.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
原文地址: https://blog.csdn.net/sky19891212/article/details/43924831

I really appreciate this blogger brother !!! 

 

4. After downloading it, I found that the right side is red, am I blind, am I blind, am I blind ... 

 

Then I searched online and there are two solutions:

 

    1. Delete the corresponding dependency in pom.xml first, then refresh the right side, then paste the dependency into pom.xml, and refresh the right side again just fine

    2. Delete the corresponding package from the local warehouse, and then let maven download again

Original address: https://blog.csdn.net/u010003835/article/details/78480626

Thanks also to this blogger brother !!!

 

After that, I may no longer have to worry about relying on package downloads, I am very happy ...

 

======================== Gorgeous dividing line ====================== ==

2020.04.09 Added: (Draw on the solutions encountered in the comment area and not covered in the article)

1.Settings -> Build,Execution,Deployment -> Build Tools -> Maven -> Work offline

The big man in the comment area said, try not to check this, you can try to modify this item to solve the problem.

(Which gangster is this, welcome to patronize, in case you discover what treasure article is not a profit, portal: https://me.csdn.net/qq_43384381)

 

2. Settings -> Build,Execution,Deployment -> Build Tools -> Maven -> Maven home directory

For the 2019 version of IDEA, you should pay attention to the compatibility issues of the maven version. Another big guy in the comment area (big guy dedicated portal: https://me.csdn.net/stonennnn) said that the 2019.3 version of IDEA is compatible with 3.6.1 maven No, I changed the latest maven 3.6.3 to make it easier. (Each version of maven can be downloaded by yourself ~)

I just recently changed the IDEA version of 2019.3, and silently glanced at my maven version: 3.6.1

(So, there is really no way to try to replace the maven version. My 2019.3 and maven3.6.1 seem to match quite well ... nothing unusual.)


————————————————
Copyright Statement: This article is an original article by CSDN blogger "Mysterious Code Farmer", following the CC 4.0 BY-SA copyright agreement, please attach the original source Link and this statement.
Original link: https://blog.csdn.net/jwcxs_m/article/details/80076909

https://blog.csdn.net/jwcxs_m/article/details/80076909

Guess you like

Origin www.cnblogs.com/whywy/p/12695929.html
Recommended