插件'org.mortbay.jetty:jetty-maven-plugin'的解析版本出错

时间:2014-02-27 23:57:04

标签: java maven

我正在使用apache-maven-3.0.5并且我收到以下错误:

解析插件版本'org.mortbay.jetty:jetty-maven-plugin'时出错 从存储库[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)]:在任何插件库中找不到插件

当我执行“Run As Maven clean”或“Run As Maven install”时,会出现以下错误:

[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

你能帮助我吗?

2 个答案:

答案 0 :(得分:0)

在pom.xml中添加以下代码段

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

注意:<project>标记用于表示<repositories>

的相对位置

检查它试图下载的版本,如果它正在敲定的存储库中不存在,那么请检查您的网络设置

答案 1 :(得分:0)

看起来网络连接失败。 插件网址:http://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-maven-plugin/ 是可用的。 检查您在构建时是否在线,或configure your proxy如果有的话。

相关问题