创建maven项目时pom.xml时:

出现如下报错信息:

Failure to transfer commons-lang:commons-lang:jar:2.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact commons-lang:commons-lang:jar:2.1 from/to central (https://repo.maven.apache.org/maven2): The operation was cancelled.

解决方法

点击菜单的 Window→preferences→meaven→User Settings

在Global Settings: 中 点击Browse...

选择路径:D:\java\DTools\DTools\apache-maven-3.3.9\conf\settings.xml (找到settings.xml 文件)

如下是settings.xml 的代码

<?xml version="1.0" encoding="UTF-8"?>

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

    <pluginGroups>
    </pluginGroups>

    <proxies>
    </proxies>

    <servers>
    </servers>

    <mirrors>
        <mirror>
            <id>tedu</id>
            <name>Tedu Maven</name>
            <mirrorOf>*</mirrorOf>
            <url>http://maven.aliyun.com/nexus/content/groups/public</url>
            <!-- <url>http://maven.oschina.net/content/groups/public</url> -->
        </mirror>
    </mirrors>
    <profiles>

    </profiles>
    <activeProfiles>
    </activeProfiles>

</settings>

创建maven项目时pom.xml报错的解决方法的更多相关文章

  1. 新建maven工程时pom.xml报错

    新建maven工程时,pom.xml报错:第一行报如下错误:multiple annotations found at this line后添加org.eclipse.m2e相关的plugin配置后, ...

  2. eclipse新建maven项目出错 pom.xml报错

    问题: 1.新建项目后会提示一个这样的错 maven-compiler-plugin:3.1:compile(1 errors) maven-compiler-plugin:3.1:testCompi ...

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

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

  4. Springboot项目中Pom.xml报错

    摘要:使用idea,两次在maven上浪费时间,第一次不知道怎么就解决了,第二次记录一下解决办法 参考博客地址: https://blog.csdn.net/u013129944/article/de ...

  5. maven项目建立pom.xml报无法解析org.apache.maven.plugins:maven-resources-plugin:2.4.3

    一.发现问题 建立maven项目后,pom.xml在显示红叉.鼠标放上去,显示Executiondefault-testResources of goalorg.apache.maven.plugin ...

  6. 新建Maven工程,pom.xml报错web.xml is missing and <failOnMissingWebXml> is set to true

    错误原因: 项目中没有web.xml 解决办法: 在项目中添加web.xml 在pom.xml中添加下面的插件 <build> <plugins> <plugin> ...

  7. sts创建maven项目 引入spring,报错

    症状: Missing artifact org.springframework:spring-core:jar:5.0.0.RC3 原因: 在引入之前没有设置spring版本号 和spring ur ...

  8. Maven 加载ojdbc14.jar报错,解决方法

    因为oracle的ojdbc.jar是收费的,所以maven的中央仓库中没有这个资源,只能通过配置本地库才能加载到项目中去. 首先下载 ojdbc14  https://pan.baidu.com/s ...

  9. CentOS7安装Docker时的异常报错与解决方法

    重要:有些人在vmware中安装了新的centos用于使用docker,但是往往会忽略了更换源与进行系统update, 这样会导致安装过程中出现诸多如下类问题,为了避免不必要的麻烦在安装docker前 ...

随机推荐

  1. tomcat安装apr报错解决

    参考http://www.cnblogs.com/nuccch/p/7598361.html 1.no c complie 安装gcc解决 2.rm: cannot remove `libtoolT' ...

  2. jenkins 2.204.2 安装, 使用国内源安装, 并且跳过插件界面, 更新成国内插件源.

    需要java环境支持,自行百度. jenkins 安装源在国外, 下载会比较慢, 尤其在linux下, 使用yum或者apt install jenkins方式安装时,经常会下载失败. 由于yum或者 ...

  3. 洛谷 P1886 滑动窗口 /【模板】单调队列

    纯板子题,入队时保证单调性,即单调栈,出队保证题目条件,本题即窗口长度k,在入队出队时都可以维护信息 ; int buf[maxm], maxq[maxm], minq[maxm], ans1[max ...

  4. 无线渗透--wifiphisher之wifi钓鱼获取wifi密码

    本来是想试验一下暴力破解的,但是由于字典太大,跑的时间也比较长,于是使用了钓鱼的方法. 先说一下wifiphisher钓鱼获取wifi密码的原理: wifiphisher对于你在攻击中选定的wifi会 ...

  5. 二十 Filter&自动登录功能

    Filter过滤器 过滤器,其实就是对客户端发出来的请求进行过滤,浏览器发出,然后服务器用Servelt处理.在中间就可以过滤,起到的是拦截的作用. 不仅仅作用于客户端请求,而且过滤服务器响应 作用: ...

  6. 序列化sys随笔补充

    sys是在和python解释器做交互 sys.path----模块查找的顺序 sys.path.append() sys.path.insert()sys.argv---只能在终端执行 sys.arg ...

  7. BZOJ1019 汉诺塔/洛谷P4285 [SHOI2008]汉诺塔

    汉诺塔(BZOJ) P4285 [SHOI2008]汉诺塔 居然是省选题,还是DP!(我的DP菜得要死,碰见就丢分) 冥思苦想了1h+ \(\to\) ?! 就是普通的hanoi NOI or HNO ...

  8. python笔记10

    今日内容 参数 作用域 函数嵌套 知识点回顾 函数基本结果 def func(name,age,email): # 函数体(保持缩进一致) a = 123 print(a) return 1111#函 ...

  9. SQL中Left Join 与Right Join 与 Inner Join 与 Full Join的区别

    原文:http://blog.csdn.net/shadowyelling/article/details/7684714 Left Join : 返回左表中的全部信息 以及右表中与左表条件相关的信息 ...

  10. iPad适配tabBarController

    iPad的tabBarController会在底部居中显示,根据不同的需求可能需要把tabBarItem均匀分布显示,具体修改如下 self.tabBar.itemPositioning = UITa ...