maven创建项目后报错“plexus-archiver:pom:1.0”

搭建maven项目时出现Failure to transfer org.codehaus.plexus:异常

今天换了台电脑在创建maven项目的时候发现pom.xml中提示如下错误

 

Failure to transfer org.codehaus.plexus:plexus-archiver:pom:1.0 from http://repo.maven.apache.org/maven2 was cached in the local repository, 
resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact
 org.codehaus.plexus:plexus-archiver:pom:1.0 from/to central (http://repo.maven.apache.org/maven2): connection timed out to 
http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-archiver/1.0/plexus-archiver-1.0.pom

 

Maven极速上手视频,手把手教你从pom到私服,点这里

 

仔细查看了仓库中少了提示中的包,去maven的中央仓库将该包下载下来放到本地仓库中,如下:

 

 刷新pom.xml后又出现如下错误,然候我依葫芦画瓢又去仓库下载了提示中的包放入对应的版本文件夹

 

 Failure to transfer org.codehaus.plexus:plexus-archiver:jar:1.2 from http://repo.maven.apache.org/maven2 was 
cached in the local repository, resolution will not be 
 reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not 
transfer artifact org.codehaus.plexus:plexus-
 archiver:jar:1.2 from/to central (http://repo.maven.apache.org/maven2): No response received after 60000
 
 Failure to transfer org.codehaus.plexus:plexus-io:jar:1.0.1 from http://repo.maven.apache.org/maven2 was 
cached in the local repository, resolution will not be 
 reattempted until the update interval of central has elapsed or updates are forced. Original 
error: Could not transfer artifact org.codehaus.plexus:plexus-io:jar:
 1.0.1 from/to central (http://repo.maven.apache.org/maven2): No response received after 60000

 

 

中央仓库对应jar的地址如下:

http://mvnrepository.com/artifact/org.codehaus.plexus/plexus-archiver

 

 

刷新项目终于好了,首先我们得保证maven_jdk和工作站中选择的jre是同一个版本,不然会出现运行错误,然后试着运行test命令,发下出现如下异常:

 

 

-Dmaven.multiModuleProjectDirectory system property is not set. Check $M2_HOME environment variable and mvn script match.

解决方式如下,加入:-Dmaven.multiModuleProjectDirectory=$M2_HOME

eclipse:

 

IDEA:若不加入执行时会一直打转,找不到相应的artchetype01

去网上看了下异常-Dmaven.multiModuleProjectDirectory,说是mave项目3版本的bug,国外的朋友已经提了issue,我也是接触maven不久,知道该问题的大神烦请告知

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

君哥聊编程

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值