gpt4 book ai didi

java - 解决插件版本错误 'org.mortbay.jetty:jetty-maven-plugin'

转载 作者:行者123 更新时间:2023-11-29 08:52:27 29 4
gpt4 key购买 nike

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

错误解决插件'org.mortbay.jetty:jetty-maven-plugin'的版本来自存储库 [本地 (C:\Documents and Settings\lamiranda.m2\repository),vaadin 快照 ( http://oss.sonatype.org/content/repositories/vaadin-snapshots/ ),中央(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

你能帮帮我吗?

最佳答案

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

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

备注:<project>标签就在那里代表 <repositories> 的相对位置

如果它正在访问的存储库中不存在该版本,请检查它尝试下载的版本,然后检查您的网络设置

关于java - 解决插件版本错误 'org.mortbay.jetty:jetty-maven-plugin',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22083368/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com