当前位置: 首页 > 知识库问答 >
问题:

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

薛朝
2023-03-14

我正在使用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

你能帮帮我吗?

共有1个答案

司立果
2023-03-14

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

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

注意: 标记仅用于表示 的相对位置

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

 类似资料:
  • 在eclipse中获取以下错误,同时导入maven项目并尝试更新它...错误解决版本的插件'org.springframework.boot: sping-boo-maven-plugin'从仓库[本地(C:\tBuild\repo),中央(https://repo.maven.apache.org/maven2)]:插件没有找到任何插件库- 在此处输入图像描述

  • 我正在阅读这些文档,仍然不知道Maven是如何决定下载哪些版本的插件的。 例如,考虑以下简单场景: 一个空的本地存储库 默认settings.xml 运行一个简单的maven命令。例如,用于,如Maven在5分钟文档中所述。 运行命令后,Maven做的第一件事就是下载一堆插件。 Maven正在下载的一些插件包括: maven-clean-plugin-2.4.1 maven-install-plu

  • 使用 use-lates-release 用于较新的版本(所有非快照),并用最新的版本替换POM的版本。我用 [anyVersionNumber] 在pom.xml中添加了依赖项(当前项目所依赖的)。 当我运行“MVN clean Package”时,生成失败,错误消息是无法解析项目的依赖项 :jar:0.1:无法找到工件 :jar:[anyVerionNumber] versions-maven

  • Maven是3.1.0。 2.2失败的原因是什么?如何解决这个问题?

  • 我正在尝试使用Maven版本插件将所有子POM升级到父版本,并在父POM中执行所有子模块的构建。Pom文件如下所示 现在,如果我使用Eclipse中的命令在基本POM上运行Maven构建 子模块正在正确构建,但是如果我将base pom版本更新到2.0并使用版本插件命令 版本正在更新,但子模块尚未构建。只有基本pom得到构建。 我是否必须明确指定在某个阶段构建子模块?我错过了什么?。

  • Sonar和Jenkins位于同一台机器上,Sonar分析在Jenkins作业发布步骤中运行。詹金斯的工作是用Maven 3.0.5构建的。 一切都很好,直到我们从4.5更新了声纳。从昨天的x到5.1.2。 更新sonar后,步骤失败,出现异常: org.apache.maven.lifecycle.生命周期执行异常:未能执行目标org.codehaus.mojo: sonar-maven-plu