maven2 构建第一个模板程序
刚开始用maven做项目管理,构建第一个项目就花了我好两天的时间,上网查资料终于还是解决了。
记录一下以备我和像我一样的初学者以后能有些参考。
问题:'org.apache.maven.plugins:maven-archetype-plugin' does not exist or no valide version ......
导致些问题的原因及解决办法:
1:使用代理上网
这种问题的解决办法网上很多,就是设置一下 maven安装目录/conf 文件夹下面的settings.xml文件中的代理
参考资源:http://freeman983.iteye.com/blog/112571
2:maven的插件不全面,崩溃
这是我碰上的问题,按第一种方法无法解决。
maven的插件出了问题,或是说崩溃了,其它方面都很正常,这也是我迷失的主要原因,怎么都想不到maven自身
会出问题,一直在网络方面找问题。
解决办法:.m2/repository/org/apache/maven 找到这个文件夹,删除它,就可以重新下载所有需要的包了,
参考资料:
February 15, 2008
'org.apache.maven.plugins:maven-archetype-plugin' does not exist
I kept getting an error about the maven-archetype-plugin whenever I tried to create a new application using maven 2. It turns out part of my local maven repository must have become corrupted or failed to download properly. It was solved by deleting .m2/repository/org/apache/maven and allowing maven to download all the required dependencies again.
So, this is for google (and for me, the next time it happens).
<!-- technorati tags start -->
Technorati Tags: apache, development, open source, maven, software
摘自:http://www.andrewsavory.com/blog/archives/001431.html
初来乍到,请多多指教