Unknown host maven.aliyun.com

使用maven的tomcat插件时报错,Unknown host maven.aliyun.com ,检查了setting.xml,发现是镜像哪里出现了问题

 

<mirror>

<id>nexus-aliyun</id>

<mirrorOf>central</mirrorOf>

<name>Nexus aliyun</name>

<url>http://maven.aliyun.com/nexus/content/groups/public</url>

</mirror>

把上面的改成这样既可。

<mirror>

<id>nexus-aliyun</id>

<mirrorOf>central</mirrorOf>

<name>Nexus aliyun</name>

<url>http://maven.aliyun.com/nexus/content/repositories/central</url>

</mirror>

E:\JavaTool\jdk1.8\bin\java.exe -Dmaven.multiModuleProjectDirectory=E:\workspace\IdeaProjects\demo -Dmaven.home=E:\JavaTool\apache-maven-3.6.3 -Dclassworlds.conf=E:\JavaTool\apache-maven-3.6.3\bin\m2.conf "-Dmaven.ext.class.path=E:\JavaTool\IntelliJ IDEA 2020.1.3\plugins\maven\lib\maven-event-listener.jar" "-javaagent:E:\JavaTool\IntelliJ IDEA 2020.1.3\lib\idea_rt.jar=61751:E:\JavaTool\IntelliJ IDEA 2020.1.3\bin" -Dfile.encoding=UTF-8 -classpath E:\JavaTool\apache-maven-3.6.3\boot\plexus-classworlds-2.6.0.jar;E:\JavaTool\apache-maven-3.6.3\boot\plexus-classworlds.license org.codehaus.classworlds.Launcher -Didea.version2020.1.3 -s C:\Users\Aleks\.m2\settings.xml -Dmaven.repo.local=C:\Users\Aleks\.m2\repository -DskipTests=true install [INFO] Scanning for projects... [INFO] [INFO] ---------------------------< com.aleks:demo >--------------------------- [INFO] Building demo 0.0.1-SNAPSHOT [INFO] --------------------------------[ pom ]--------------------------------- Downloading from nexus-aliyun: http://maven.aliyun.com/nexus/content/repositories/central/org/apache/maven/plugins/maven-install-plugin/2.5.2/maven-install-plugin-2.5.2.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.117 s [INFO] Finished at: 2025-03-07T14:14:56+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Plugin org.apache.maven.plugins:maven-install-plugin:2.5.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.5.2: Could not transfer artifact org.apache.maven.plugins:maven-install-plugin:pom:2.5.2 from/to nexus-aliyun (http://maven.aliyun.com/nexus/content/repositories/central): Transfer failed for http://maven.aliyun.com/nexus/content/repositories/central/org/apache/maven/plugins/maven-install-plugin/2.5.2/maven-install-plugin-2.5.2.pom: Unknown host maven.aliyun.com -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
03-09
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值