2014-02-27 105 views
2

我使用的Apache Maven的-3.0.5,我得到以下错误:解决错误版本的插件“org.mortbay.jetty:码头 - Maven的插件”

解决错误版本的插件'org.mortbay.jetty:jetty-maven-plugin' from the repositories [local(C:\ Documents and Settings \ lamiranda.m2 \ repository), vaadin-snapshots(http://oss.sonatype.org/content/repositories/vaadin-snapshots/), central(http:// repo .maven.apache.org/maven2)]:插件没有在任何插件库中找到

当我做“运行为Maven干净”或“作为Maven安装运行”时出现以下错误:

[INFO] Scanning for projects... 
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.royale:Restaurant:war:1.0-SNAPSHOT 
[WARNING] 'build.plugins.plugin.version' for org.eclipse.jetty:jetty-maven-plugin is missing. @ line 209, column 12 
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 155, column 12 
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. 
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects. 
[WARNING] 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building Restaurant Web Application 1.0-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
Downloading: http://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-maven-plugin/maven-metadata.xml 
Downloading: http://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-maven-plugin/org/eclipse/jetty/jetty-maven-plugin/maven-metadata.xml 
[WARNING] Could not transfer metadata org.eclipse.jetty:jetty-maven-plugin/maven-metadata.xml from/to vaadin-snapshots (http://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-maven-plugin/): Connection to http://repo.maven.apache.org refused 
[WARNING] Could not transfer metadata org.eclipse.jetty:jetty-maven-plugin/maven-metadata.xml from/to central (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 43.312s 
[INFO] Finished at: Thu Feb 27 17:47:21 CST 2014 
[INFO] Final Memory: 4M/15M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Error resolving version for plugin 'org.eclipse.jetty:jetty-maven-plugin' from the repositories [local (C:\Documents and Settings\lamiranda\.m2\repository), vaadin-snapshots (http://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-maven-plugin/), 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 

你能帮助我吗?按照你的pom.xml片段

+0

你在防火墙或代理后面运行吗? – limc

+0

当您运行maven命令时,添加'-X'以输出更详细的消息。它可能会帮助你。 – Hong

回答

0

附加

<project ...> 
<repositories> 
    <repository> 
     <id>maven repo</id> 
     <url>http://repo1.maven.org/maven2/</url> 
    </repository> 
</repositories> 
</project> 

注:<project>标签只是为了表示<repositories>

检查它正在尝试,如果它不存在,下载的版本的相对位置然后检查您的网络设置

+0

对我的作品,但我添加 行家回购 http://repo1.maven.org/maven2/ chou

相关问题