新建xml文件,内容如下:
1 <?xml version="1.0" encoding="UTF-8"?> 2 3 <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 5 xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> 6 7 <pluginGroups> 8 </pluginGroups> 9 10 <proxies> 11 </proxies> 12 13 <servers> 14 </servers> 15 16 <mirrors> 17 18 <mirror> 19 <id>ali</id> 20 <name>ali Maven</name> 21 <mirrorOf>*</mirrorOf> 22 <url>https://maven.aliyun.com/repository/public/</url> 23 </mirror> 24 25 </mirrors> 26 <profiles> 27 28 </profiles> 29 <activeProfiles> 30 </activeProfiles> 31 32 </settings>
Eclipse中,Window->Preferences->Maven->User Settings,点击“Browse...”按钮选择该xml后,点击“Update Settings”
原文地址:https://www.cnblogs.com/lroy/p/12327017.html
时间: 2024-10-06 16:38:16