Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/343.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 解析插件的版本时出错';jetty:jetty maven插件';_Java_Maven - Fatal编程技术网

Java 解析插件的版本时出错';jetty:jetty maven插件';

Java 解析插件的版本时出错';jetty:jetty maven插件';,java,maven,Java,Maven,我使用的是apache-maven-3.0.5,出现以下错误: 解析插件“org.mortbay.jetty:jetty maven plugin”的版本时出错 从存储库[本地(C:\Documents and Settings\lamiranda.m2\repository), 瓦丁快照(), 中央的(http://repo.maven.apache.org/maven2)]:在任何插件存储库中都找不到插件 当我执行“作为Maven clean运行”或“作为Maven安装运行”时,会发生以下错

我使用的是apache-maven-3.0.5,出现以下错误:

解析插件“org.mortbay.jetty:jetty maven plugin”的版本时出错 从存储库[本地(C:\Documents and Settings\lamiranda.m2\repository), 瓦丁快照(), 中央的(http://repo.maven.apache.org/maven2)]:在任何插件存储库中都找不到插件

当我执行“作为Maven clean运行”或“作为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中添加以下代码片段

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

马文回购
http://repo1.maven.org/maven2/
注意:
标记正好代表


如果要下载的存储库中不存在它,请检查它试图下载的版本,然后检查您的网络设置

看起来像是网络连接故障。 插件URL: 有空。
检查构建时是否在线。

是否在防火墙或代理后运行?运行maven命令时,添加
-X
以输出更详细的消息。它可能对我有帮助,但我添加了maven repo repo1.maven.org/maven2/