maven中常遇到的一些错误

1,eclipse could not resolve archetype这个是在eclipse创建项目时,选择archetype时出现的:

在新建maven工程时报错:

Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repositories. 
 Could not resolve artifact 
   Missing org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE

 

could not resolve archetype这个错误出现的原因是,在创建项目时使用的是我自己配置的maven仓库中心,但是未启动nexus服务器,这时就会在maven中找不到。但是重新启动nexus时,它不会再重新尝试获取了。这个在错误的详细信息中会有提示。

 

could not resolve archetype解决办法是删除maven仓库下载的jar,即在maven的settings.xml配置的下载路径,并且更换一个workplace,然后重新配置一下maven,

 

重新导入项目就可以了。

 

2,was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced -> [Help 1]

这个错误一般是在第一次更新jar的时候没有启动中心仓库nexus,但是重新启动后,它又不更新了。目前我的解决方法的是进入到nexus的目录下D:\Soft\windows\nexus-2.14.0-01-bundle\sonatype-work\nexus\storage\central,找到你更新失败的那个jar包的目录。重新在eclipse中 install 一下就可以了。这是maven中经常遇到的错误之一

更多关于游戏技术方面的资料请参考:http://www.youxijishu.com

posted @ 2016-11-11 12:23  游戏技术  阅读(416)  评论(0编辑  收藏  举报