创建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. app开屏广告

    最近公司有个需求需要做app开屏广告(跳转到不同的页面)--下面是app开屏广告的处理 1.管理后台效果图 (1)广告链接--商品详情 (2)广告链接--关联模块 (3)广告链接--消息富文本 (4) ...

  2. 浅谈Spring发展史

    1 码农的春天----------Spring来了 Spring官网 :http://www.springframework.org 关于Spring的发展起源要回溯到2002年,当时正是Java E ...

  3. Linux 补丁 的简单使用: 制作补丁,打补丁,撤销补丁

    ​ 背景: 补丁的使用对于嵌入式开发人员来说,在维护或者开发中都比较方便. 制作补丁: diff - 逐行比较文件. 格式: diff 参数 旧文件/旧文件夹 新文件/新文件夹 (注意顺序 新旧文件夹 ...

  4. 学习Linux让我进入了知名企业

    说起我学习Linux的原因是多方面的,大学时我学的是物理学师范专业,有部分计算机课程,但我觉得这些课程没什么实际作用,我自己对计算机比较感兴趣,我利用业余时间学习了很多计算机技术.在大学期间我参加了很 ...

  5. UVA10820 交表 Send a Table

    \(\Large\textbf{Description:} \large{输入n,求有多少个二元组(x,y)满足:1\leqslant x,y\leqslant n,且x和y互素.}\) \(\Lar ...

  6. android名词

    NDK:Native Development Kit JNI:Java Native Interface

  7. imput placeholder 移动端不居中问题

    input{ height: 100%; } input::-webkit-input-placeholder { display: flex; align-items: center; line-h ...

  8. 006-PHP检测是否为整数

    <?php function checkInteger($Number) { if ($Number > 1) { /* 整数减1仍然是整数 */ return (checkInteger ...

  9. Java 定时循环运行程序

    Timer 和 ScheduledExecutorSeruvce 都能执行定时的循环任务,有函数 scheduleAtFixedRate.但是,如果任务运行时间较长,超过了一个周期时长,下一个任务就会 ...

  10. mysql concat与concat_ws区别

    select concat('大','小') as size from 表 查询出结果为:大小 select concat('大',NULL) as size from 表 查询出结果为:null c ...