错误信息

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

You are referring to a non-existing plugin, e.g. by means of a typo in its group id, artifact id or version.
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.
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.
There is a general network problem that prevents Maven from accessing any remote repository, e.g. a missing proxy configuration.
Maven failed to save the files to your local repository, see LocalRepositoryNotAccessibleException for more details.
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. In case of a general network-related problem, you could also consult the following articles: Configuring a Proxy
Security and Deployment Settings
Guide to Remote Repository Access through Authenticated HTTPS
Note: For performance reasons, Maven caches the information that the plugin could not be downloaded. Depending on your setup, you might need to clear this cache by adding the flag -U to the command line for your corrections to take effect.

原因分析

根据提示,查找该错误的官方分析链接

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

  1. 您指的是一个不存在的插件,例如通过其组ID、工件ID或版本中的键入。
  2. 您正在使用未部署到中央Maven存储库的第三方Maven插件,而您的POM/设置缺少所需的“插件库”来下载插件。注意,在查找插件及其依赖项时,不考虑“存储库>声明”,只搜索插件库。
  3. 您配置的插件库需要身份验证,Maven无法向服务器提供正确的凭据。在这种情况下,请确保${Huff.Hoe}//M2/Stuts.xml包含一个声明,其与插件库的匹配使用。有关更详细的信息,请参见Maven设置参考。
  4. 存在一个一般的网络问题,它阻止Maven访问任何远程存储库,例如缺少的代理配置。
  5. Maven无法将文件保存到本地存储库中,请参阅LoalAlpLogiTyNoAccess。
  6. 您所配置的插件库对于请求的插件的特定版本是禁用的。例如,如果您想使用插件的快照版本,请确保没有“快照> <启用”>错误/启用> <快照>。同样,为了解决插件的发布版本,插件库不应该被配置为<发行> >启用>错误> /使能> /发行版>。有关存储库配置的更多信息,请参见POM参考。
  7. 在这些情况下,检查您的POM和/或设置的适当内容。如果您在Stutux.xml的配置文件中配置了插件库,还验证此配置文件实际上被激活,例如通过调用MVN帮助:活动配置文件。
  8. 在一般网络相关问题的情况下,您也可以参考以下文章:
    • 配置代理
    • 安全和部署设置
    • 通过认证HTTPS的远程存储库访问指南

解决方法:

  1. 删除maven库里面文件:.m2\repository\org\apache\maven\plugins

    右击maven项目,maven->update project,利用eclipse重新下载本地仓库

    参考文章

    • 效果:没有作用
  2. 修改pom.xml文件

    1. 在pom.xml中添加新的dependency:
        <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.1</version>
    <type>maven-plugin</type>
    </dependency>
    ```
    - 效果: 没有作用 2. 在build中添加:
    ``` <build>
    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven.compiler.plugin</artifactId>
    <configuration>
    <source>1.5</source>
    <target>1.5</target>
    <verbal>true</verbal>
    </configuration>
    </plugin>
    </plugins>
    </build>
    • 效果:没有作用
  3. 更改setting.xml 文件的mirror镜像

    1. 更改为
         <id>mirrorId</id>
    <mirrorOf>repositoryId</mirrorOf>
    <name>Human Readable Name for this Mirror.</name>
    <url>http://mvnrepository.com/</url>
    </mirror>
    ```
    - 没有作用 2. 更改为
    ```<mirror>
    <id>alimaven</id>
    <mirrorOf>central</mirrorOf>
    <name>aliyun maven</name>
    <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
    </mirror>```
    - 下载很慢,有作用

以上解决办法是基于我公司内部网络的情况下进行,我的没有作用不代表不好使.最后在一个文章中发现, https://repo.maven.apache.org/maven2网站被禁,不知道消息是否靠谱.

使用eclipse创建maven项目出现的一个问题的更多相关文章

  1. (八)Eclipse创建Maven项目运行mvn命令

    1.Eclipse创建Maven项目 使用Eclipse创建一个Maven项目非常的简单,选择菜单项File>New>Other(也可以在项目结构空白处右击鼠标键),在弹出的对话框中选择M ...

  2. eclipse 创建maven 项目 动态web工程报错

    Eclipse 创建maven 项目 动态web工程 注:Eclipse版本为(Version: Mars.1 Release (4.5.1))maven版本为(apache-maven-3.3.9) ...

  3. Eclipse 创建 Maven 项目、Maven JavaWeb 项目

    Eclipse 创建 Maven 项目         新建一个maven项目          (默认)(如果不行第一个Create a simple ... 也选中) 默认         Jav ...

  4. eclipse 创建maven 项目 动态web工程完整示例

    需求表均同springmvc案例 此处只是使用maven 注意,以下所有需要建立在你的eclipse等已经集成配置好了maven了,说白了就是新建项目的时候已经可以找到maven了 没有的话需要安装m ...

  5. eclipse 创建maven 项目 动态web工程完整示例 maven 整合springmvc整合mybatis

    接上一篇: eclipse 创建maven 项目 动态web工程完整示例 eclipse maven工程自动添加依赖设置 maven工程可以在线搜索依赖的jar包,还是非常方便的 但是有的时候可能还需 ...

  6. eclipse 创建 maven 项目时如何修改 web 的版本和 jdk 的版本

    eclipse 创建 maven 项目时如何修改 web 的版本和 jdk 的版本 在使用 eclipse 创建 maven 项目的时候,默认的 web.xml 的版本时 2.3,默认 jre 的版本 ...

  7. 1.搭建maven,eclipse创建maven项目

    1.下载maven包,下载地址为:http://maven.apache.org/download.cgi 2.解压zip包 3.eclipse 引入maven: window-Preferences ...

  8. 如何在Eclipse中搭建MyBatis基本开发环境?(使用Eclipse创建Maven项目)

    实现要求: 在Eclipse中搭建MyBatis基本开发环境. 实现步骤: 1.使用Eclipse创建Maven项目.File >> New >> Maven Project ...

  9. Maven安装和配置,eclipse创建Maven项目

    提示:使用Maven需要先安装jdk. 下载安装Maven 一.下载最新版的Maven,下载地址:http://maven.apache.org/download.cgi 二.将Maven下载到E:\ ...

随机推荐

  1. Android软件开发之SharedPreferences

    SharedPreferences 一种轻量级的数据保存方式 以键值对的方式存储 用于存储小批量的数据   使用方法: SharedPreferences sp= getSharedPreferenc ...

  2. Qt5应用程序封包

    系统环境:windows10+vs2017+qt5.12 目的:生成.exe可执行文件. 步骤: 1.选择release模式,生成解决方案. 2.打开命令行,cd到生成的可执行文件.exe目录下 3. ...

  3. 【2018 ICPC亚洲区域赛徐州站 A】Rikka with Minimum Spanning Trees(求最小生成树个数与总权值的乘积)

    Hello everyone! I am your old friend Rikka. Welcome to Xuzhou. This is the first problem, which is a ...

  4. 关于js复制的那些事儿

    window.clipboardData的作用是在页面上将需要的东西复制到剪贴板上,提供了对于预定义的剪贴板格式的访问,以便在编辑操作中使用. 三个方法 (1)clearData(sDataForma ...

  5. restframework中的那些参数你知道吗?

    序列化是很重要的过程, 在构建数据结构的时候, 往往会出现很多意想不到的问题, 有一些参数你要用, 但是没有办法穿过来, 怎么办> 今天这篇博客就是写我之前的一个小项目中用restframewo ...

  6. 3D立方体

    效果图 主要用到的3D属性 1.保留子元素的3d属性:transform-style:preserve-3d; 2.2D变形属性: ①transform:translate()平移,分X轴,Y轴,Z轴 ...

  7. c语言:矩阵相乘-矩阵相加 新手练习1

    #include<stdio.h> #include<stdlib.h> #include<time.h> #include<string.h> voi ...

  8. FIFO队列 ADT接口 链表实现

    FIFO.h (接口) #include "Item.h" void QUEUinit(int); int QUEUempty(void); void QUEUput(Item); ...

  9. BZOJ1432_Function_KEY

    题目传送门 找规律. 画一个像这样的图: 不同颜色为不同层,因为函数图像可对称,所以只考虑K<=N/2的情况. 最小为min(K,N-K+1)*2. N=1时特殊考虑,答案为1. code: # ...

  10. spring源码-BeanFactoryPostProcessor-3.2

    一.BeanFactoryPostProcessor这个是spring容器的拓展之一,其目的是在容器初始化完成之前,通过beanFactory对上下文进行进行操作. 二.常用场景,需要对beanDef ...