第一次用 Spring Starter Project 创建一个Spring应用时,POM 文件报错:

Project build error: Non-resolvable parent POM for com.example:demo-1:0.0.1-SNAPSHOT: Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:1.5.4.RELEASE 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 org.springframework.boot:spring-boot-starter-parent:pom:1.5.4.RELEASE from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org: nodename nor servname provided, or not known and 'parent.relativePath' points at no local POM

解决方法:

参考stack overflow:

I've also encountered a lot of error when creating a new STS project for the first time. This seems to be happen only if I don't have any Maven repository or haven't launch/use Maven before. In my case, I solve this by launching Maven command from command line manually. Try to 'cd' to the project directory that contains pom.xml and call mvn that comes with STS from there.

cd c:\users\name\sts-projects\projectname
c:\programs\springsource\apache-maven-3.0.3\bin\mvn compile
Then, open STS, right click on project name, select 'Maven', 'Update Project...' Select on 'Force Update of Snapshots/Releases'. Don't select 'Offline'.

即打开终端,进入出错项目的根目录,然后使用 maven bin 目录下的 mvn 编译一下,完成之后右键项目 Maven——Update Project 即可。

Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:2.0.1.RELEASE from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempt的更多相关文章

  1. Failure to transfer org.apache.maven:maven-archiver:pom:2.5 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval o

    pom.xml报错: Failure to transfer org.apache.maven:maven-archiver:pom:2.5 from https://repo.maven.apach ...

  2. Failure to transfer org.apache.maven:maven-archiver:pom:2.5 from http://repo.maven.apache.org/ maven2 was cached in the local repository, resolution will not be reattempted until the update interv

    Failure to transfer org.apache.maven:maven-archiver:pom:2.5 from http://repo.maven.apache.org/  mave ...

  3. spark mllib配置pom.xml错误 Multiple markers at this line Could not transfer artifact net.sf.opencsv:opencsv:jar:2.3 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org

    刚刚spark mllib,在maven repository网站http://mvnrepository.com/中查询mllib后得到相关库的最新dependence为: <dependen ...

  4. 二、Spring Boot 中maven中dependencies所有的jar包都报红,install报错(https://repo.maven.apache.org/maven2): Not authorized , ReasonPhrase:Authorizatio

    问题一:现象:打开SpringBoot项目后,所有依赖包都报红色波浪线 1.install报错(https://repo.maven.apache.org/maven2): Not authorize ...

  5. Failure to find xxx in xxx was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced @ xxx

    问题: 在linux服务器上使用maven编译war时报错: 16:41:35 [FATAL] Non-resolvable parent POM for ***: Failure to find * ...

  6. Maven-010-maven 编译报错:Failure to ... in ... was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced.

    今晚在编译 maven 项目的时候,命令行报错,出现 Failure to ... in ... 类似错误,详细的错误信息如下所示: [INFO] -------------------------- ...

  7. Failure to transfer org.springframework:spring-jcl:jar:5.0.7.RELEASE from

    错误信息: Failure to transfer org.springframework.boot:spring-boot-maven-plugin:pom:1.5.4.RELEASE from h ...

  8. Failed to transfer file: http://repo.maven.apache.org/maven2/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar

    解决办法:maven的配置文件settings.xml中添加mirror地址 <mirror>       <id>alimaven</id>       < ...

  9. maven build失败 (Failure to find io.renren:renren-security:pom:3.2.0 in http://maven.aliyun.com/nexus/content/groups/public/ was cached in the local repository...)

      今天mvn clean package一个子工程(renren-admin)时报错: Failed to execute goal on project renren-admin: Could n ...

随机推荐

  1. Linux中的绝对路径和相对路径

    一.介绍 1,文件路径 什么是文件的路径? 答:这个文件存放的地方,可以联想为 文件的“家”. 在Linux中,存在着绝对路径和相对路径 绝对路径:路径的写法一定是由根目录 / 写起的,例如 /usr ...

  2. eclipse里面的常用快捷键

    eclipse里面的常用快捷键:代码实战 package com.study.lgs; import java.awt.List; import java.io.FileInputStream; im ...

  3. 新版本IntelliJ IDEA 构建maven,并用Maven创建一个web项目

    之前都没试过用maven来管理过项目,但是手动找包导包确实不方便,于是今天用2016版的IDEA进行了maven的初尝试. 打开IDEA,创建新项目: 然后选择Maven,以及选择自己电脑的jdk: ...

  4. unity---------------------关于BuildAssetBundles的使用(打包)

    using UnityEditor;using UnityEngine; public class BuildAssetBundle{ /// <summary> /// 点击后,所有设置 ...

  5. Jenkins+Github配置【转】

    一.GitHub上配置 前提:Jenkins能正常打开 将本地文件上传到GitHub上:进入终端 cd Documents cd project git clone https://github.co ...

  6. 关于HTTP Message

    HTTP Message包括JS, HTML等Resource.这些都是相对来说有代码可以写的东西,但是原理的东西是没有代码的.coding只是很少的一部分工作内容. Browser的流程.比如con ...

  7. 解决Windows2003的IE安全级别不能修改的问题

    默认装完win2k3IE安全级别是不能修改的,不管怎么样修改,系统总提示说 “此域的推荐安全级别是“安全级-高”.您选择的级别较低.还是返回最高级别的.刚才弄voip,在win2k3虚拟机测试,差点气 ...

  8. Java编程思想学习笔记——访问权限修饰词

    几种访问权限修饰词 public,protected,private,friendly(Java中并无该修饰词,即包访问权限,不提供任何访问修饰词) 使用时,放置在类中成员(域或方法)的定义之前的,仅 ...

  9. git clone Google的代码失败的解决方法

    git clone Google的volley代码遇Q. 想到用代理服务器就可以解决这个问题.Google了一下解决方法,记录下来,分享一下. git config:                 

  10. python中,获取字符串的长度

    说明: 与其他的语言一样,有时候需要查看或者说计算字符串的长度.在此记录下python中通过哪个函数实现. 操作过程: 1.通过len()函数返回字符串的长度 >>> text='p ...