问题:

1.新建项目后会提示一个这样的错

maven-compiler-plugin:3.1:compile(1 errors)

maven-compiler-plugin:3.1:testCompile(1 errors)

2.关掉后看pom.xml

3.plugin标签也报错,无法解析

鼠标放红叉上提示

错误:

 CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: Failed to read artifact 
 descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:3.1: UnresolvableModelException: Failure to transfer org.apache.maven:maven-parent:pom:23 from http://maven.aliyun.com/
 nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of alimaven has elapsed or updates are forced. Original error: Could 
 not transfer artifact org.apache.maven:maven-parent:pom:23 from/to alimaven (http://maven.aliyun.com/nexus/content/groups/public/): sun.security.validator.ValidatorException: PKIX path 
 building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (execution: default-testCompile, phase: test-compile)
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (execution: default-compile, phase: compile) 

解决:

排查eclipse配置maven的地方,和配置的仓库都没问题

再排查settings.xml,可以尝试更换镜像的配置,但我不是这个问题(可以换成下面这个,是我成功后的)

 <mirrors>
<mirror>
<id>nexus-aliyun</id>
<mirrorOf>*</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
</mirror>
</mirrors>

因为错误是说解析不了plugin,我猜想是上次更新时强制关闭eclipse导致某些包没更新好,然后导致版本问题之类的总之无法解析出来报错,就重新换了一个仓库,就成功了

我认为应该是你自己的maven仓库里\org\apache\maven目录下的一些关于plugin的包受损了 ,也可以尝试只更换别人好的maven文件夹,或者全部删掉plugin的相关包重新下载

eclipse新建maven项目出错 pom.xml报错的更多相关文章

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

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

  2. 创建maven项目时pom.xml报错的解决方法

    创建maven项目时pom.xml时: 出现如下报错信息: Failure to transfer commons-lang:commons-lang:jar:2.1 from https://rep ...

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

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

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

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

  5. Springboot项目中Pom.xml报错

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

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

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

  7. 新建maven项目index.jsp文件报错处理

    最近用eclipse新建了一个maven项目,结果刚新建完成index.jsp页面就报错了,先把错误信息贴出来看看 后来就找资料,结果发现两种解决办法,希望可以帮助用得上的人! 第一种:直接在pom. ...

  8. Eclipse导入Maven项目,使用server 启动报错,class 找不到,

    问题发现: 1.导入maven 项目后,用server 启动,选择项中没有这个项目 解决: 说明server 没有把该项目当成web项目,需要设置 项目右键 properties  ---- proj ...

  9. 新建Maven项目Index.jsp文件报错解决方法

    The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path    in ...

随机推荐

  1. Untiy3D的游戏物体的实例和刚体的使用

    一,如下代码, GameObject b = GameObject.Instantiate(bullet, transform.position, transform.rotation) as Gam ...

  2. HTML水平居中和垂直居中的实现方式

    父元素是块元素,根据子元素不同分为以下几种: 1.子元素是行内元素: a.水平居中:在父元素上设置text-align:center; b.垂直居中:在行内子元素上设置行高与父元素相同line-hei ...

  3. Python之路-Python常用模块-time模块

    一.time模块 常用的一种获取当前时间以及时间格式化的模块,模块名称:time time模块在Python原生安装中就存在所以不需要进行任何安装操作,直接使用即可. 导入方式: import tim ...

  4. 有用的2个 Windows 下批处理文件(bat文件):

    创建多个文件夹(目录): 新建一个记事本:win + R –>输入notepad 在笔记本中输入如下: mkdir Would mkdir you mkdir marry mkdir me 另存 ...

  5. C++ 编译器的安装(MinGW)

    GNU GNU是一个自由软件工程项目,GNU工程已经开发了一个被称为“GNU”(GNU是“不是UNIX”的缩写)的.对Unix向上兼容的完整的自由软件系统(free software system). ...

  6. python基础——对时间进行加减

    在datetime模块中有一个timedelta这个方法,它代表两个datetime之间的时间差.. In [42]: datetime.datetime.now().strftime('%Y-%m- ...

  7. Sumdiv(约数和问题)

    题目地址 看到这题的题解,大佬都说是小学奥数,蔡得我不敢鸡声. 求 \(a^b\) 所有的约数之和 mod \(9901\) \((1<=a,b<=5*10^7)\) 题解 做这道题,我还 ...

  8. 在子组件中触发事件,传值给父组件-vue

    1.通过$emit触发事件 在子组件<x-test>中触发事件: <button @click="toSearchProduct()">搜索</but ...

  9. vuex的mapState方法来获取vuex的state对象中属性

    有两种写法 1.首先在组件中引入vuex的mapState方法: 首先在组件中引入vuex的mapState方法: import { mapState } from 'vuex' 然后在compute ...

  10. leetcode-167周赛-1292-元素和小于等于阈值的正方形的最大边长

    题目描述; 自己的提交:超时 class Solution: def maxSideLength(self, mat: List[List[int]], threshold: int) -> i ...