问题:

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. PHP表单数组的具体使用方法介绍

    < input name="a[]" value="1" /> < input name="a[]" value=&quo ...

  2. Linux性能优化从入门到实战:11 内存篇:内存泄漏的发现与定位

      用户空间内存包括多个不同的内存段,比如只读段.数据段.堆.栈以及文件映射段等.但会发生内存泄漏的内存段,只有堆和文件映射段中的共享内存.   内存泄漏的危害非常大,这些忘记释放的内存,不仅应用程序 ...

  3. MYSQL学习笔记——数据类型

    mysql的数据类型可以分为三大类,分别是数值数据类型.字符串数据类型以及日期时间数据类型. 数值数据类型                                               ...

  4. nodejs和npm之间的关系

    Node.js是JavaScript的一种运行环境,是对Google V8引擎进行的封装.是一个服务器端的javascript的解释器. 包含关系,nodejs中含有npm,比如说你安装好nodejs ...

  5. python的次方操作

    好简单,不需要import任何包 b=a**n就是求a的n次方,如果n=0.5就是开方 如果开方的是负数或者附复数,需要 import math b=math.sqrt(a) 这样

  6. LightOJ 1079 Just another Robbery (01背包)

    题目链接 题意:Harry Potter要去抢银行(wtf???),有n个银行,对于每个银行,抢的话,能抢到Mi单位的钱,并有pi的概率被抓到.在各个银行被抓到是独立事件.总的被抓到的概率不能超过P. ...

  7. 按照MySQL

    转载自:https://mp.weixin.qq.com/s?__biz=MzIwNzk0NjE1MQ==&mid=2247484200&idx=1&sn=6eed12242c ...

  8. 网页用html还是php

    首先,不管是html还是php,虽然这是两种不同的语言,但是都可以编写网页.不同的是,使用html编写网页是纯静态的网页,无法是运行在本地的,且无法和用户进行交互:而使用php编写的网页则是动态的,运 ...

  9. 虚拟机CentOS7安装docker并搭建Gitlab私服

    一.下载安装虚拟机和CentOS7系统 这些流程比较简单不会有什么坑,这里不再阐述 二.安装docker 1.Docker 要求 CentOS 系统的内核版本高于 3.10 ,查看本页面的前提条件来验 ...

  10. BUUCTF | [De1CTF 2019]SSRF Me

    解法一字符串拼接: 1.得到签名sign http://8fa4531c-1164-49b7-a700-70e77e6aacb7.node3.buuoj.cn/geneSign?param=flag. ...