admin管理员组

文章数量:1642447

发生错误原因:

(官方解释:

This error occurs when you employ a plugin that Maven could not download. Possible causes for this error are:

  1. You are referring to a non-existing plugin, e.g. by means of a typo in its group id, artifact id or version.
  2. You are using a third-party Maven plugin that is not deployed to the central Maven repository and your POM/settings is missing the required <pluginRepository> to download the plugin. Note that <repository> declarations are not considered when looking for the plugin and its dependencies, only <pluginRepositories> are searched for plugins.
  3. The plugin repository you have configured requires authentication and Maven failed to provide the correct credentials to the server. In this case, make sure your ${user.home}/.m2/settings.xml contains a <server> declaration whose <id> matches the <id> of the plugin repository to use. See the Maven Settings Reference for more details.
  4. There is a general network problem that prevents Maven from accessing any remote repository, e.g. a missing proxy configuration.
  5. Maven failed to save the files to your local repository, see LocalRepositoryNotAccessibleException for more details.
  6. The plugin repository you have configured is disabled for the specific version of the plugin you requested. For instance, if you want to use a SNAPSHOT version of a plugin, make sure you don't have <snapshots><enabled>false</enabled></snapshots> configured. Likewise, in order to resolve a released version of the plugin, the plugin repository should not be configured with <releases><enabled>false</enabled></releases>. See the POM Reference for more information on repository configuration.

In those cases, check your POM and/or settings for the proper contents. If you configured the plugin repository in a profile of your settings.xml, also verify that this profile gets actually activated, e.g. via invoking mvn help:active-profiles.

 (翻译:

PluginResolutionException

跳到元数据结束
  • 本杰明·本特曼Benjamin Bentmann)创作,最后于20101月18日修改
转到元数据的开始

当您使用Maven无法下载的插件时,会发生此错误。这个错误的可能原因是:

  1. 您指的是一个不存在的插件,例如通过其组ID,工件ID或版本中的拼写错误。
  2. 您正在使用未部署到中央Maven存储库的第三方Maven插件,并且您的POM /设置缺少<pluginRepository>下载插件所需的内容。请注意,<repository>查找插件及其依赖关系时不考虑声明,只<pluginRepositories>搜索插件。
  3. 您配置的插件库需要身份验证,Maven未能向服务器提供正确的凭据。在这种情况下,请确保您${user.home}/.m2/settings.xml包含一个插件库相匹配的<server>声明有关更多详细信息,请参阅Maven设置参考<id><id>
  4. 有一个普遍的网络问题,阻止Maven访问任何远程存储库,例如缺少代理配置。
  5. Maven未能将文件保存到本地存储库,请参阅LocalRepositoryNotAccessibleException获取更多详细信息。
  6. 您所配置的插件库已经被禁用了。例如,如果你想使用插件的SNAPSHOT版本,请确保你没有<snapshots><enabled>false</enabled></snapshots>配置。同样,为了解决插件的发布版本,插件库不应该被配置为<releases><enabled>false</enabled></releases>有关存储库配置的更多信息,请参阅POM参考

在这些情况下,请检查您的POM和/或设置的正确内容。如果您在您的配置文件中配置了插件存储库settings.xml,还要验证此配置文件是否真正被激活,例如通过调用mvn help:active-profiles

如果出现一般网络相关的问题,您也可以参考以下文章:

  • 配置代理
  • 安全和部署设置
  • 通过经过身份验证的HTTPS指导远程存储库访问

注意:出于性能原因,Maven缓存插件无法下载的信息。根据您的设置,您可能需要通过将标志添加-U到命令行来清除此缓存,以使更正生效


解决方式:

方式1:使用 mvn clean package -U 打包即可

方式2:  在setting.xml中使用原始中央仓库  就是使用默认的仓库地址


本文标签: 无法下载插件错误maven