在尝试创建项目时,Maven给出了“解决插件版本”错误

时间:2014-04-11 01:31:38

标签: maven proxy pom.xml mahout

我是Linux和Maven的新手。我想让maven工作,所以我可以安装Mahout。我对这个过程不仅仅有一个问题,但我会关注最基本的问题:

我正在尝试关注this guide 学习如何开始使用maven。当我在终端

中运行以下命令时
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

我收到以下错误:

dave@CodeKingdom:~/workspace/maven_test$ mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

[INFO] Scanning for projects...
[WARNING] The metadata /home/dave/.m2/repository/org/apache/maven/plugins/maven-archetype-plugin/maven-metadata-central.xml is invalid: end tag name </HEAD> must be the same as start tag <META> from line 1 (position: START_TAG seen ...e/maven/plugins/maven-archetype-plugin/maven-metadata.xml"></HEAD>... @1:385) 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.446s
[INFO] Finished at: Thu Apr 10 17:43:57 PDT 2014
[INFO] Final Memory: 8M/310M
[INFO] ------------------------------------------------------------------------
[ERROR] Error resolving version for plugin 'org.apache.maven.plugins:maven-archetype-plugin' from the repositories [local (/home/dave/.m2/repository), central (http://repo.maven.apache.org/maven2)]: Plugin not found in any plugin repository -> [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/PluginVersionResolutionException

我无法理解那里的资源。根据我的谷歌搜索收集的是,maven无法连接到互联网下载必要的文物。但是我不确定是否应该修改setting.xml或pom.xml来修复它,或者我是否应该做一些完全不同的事情。另外,我似乎无法在我的maven文件夹中找到pom.xml文件。有一个settings.xml文件,但我不清楚如何或是否应该修改它。 任何帮助表示赞赏。

0 个答案:

没有答案