研究maven多模块项目时,因为家里和公司不能同时开发,所以把家里搭建好的项目复制到公司继续研究,

当时家里的电脑搭建好项目之后是没问题的,但是复制到公司的eclipse上之后就看到pom文件出现下面的错误:

Multiple annotations found at this line:
- 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)
- CoreException: Could not get the value for parameter compilerId for plugin execution default-compile: PluginResolutionException: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be
resolved: The repository system is offline but the artifact com.google.collections:google-collections:jar:1.0 is not available in the local repository.
- CoreException: Could not get the value for parameter compilerId for plugin execution default-testCompile: PluginResolutionException: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be
resolved: The repository system is offline but the artifact com.google.collections:google-collections:jar:1.0 is not available in the local repository.
网上搜罗一大堆都没找到解决办法,最后在一个英文文档找到了解决方案,翻译是这样的

这不是一个独特的问题,偶尔发生(有时由于连接缓慢,有时由于代理服务器现在允许下载)
你可以通过以下任何一种方式来摆脱这个问题:
1)强制更新:右键单击Eclipse中的项目> Maven >更新项目在该屏幕上选择快照/发布的复选框强制更新
2)清除Maven缓存:如果您仍然面临问题,请转到系统上的本地存储库,该库可能存在ATC:\\\用户\ MyUrNeNe\\M2\ReaviToRyy,并删除.cache文件夹,然后执行步骤1。
3)如果仍然面临问题,手动转到ORG/Apache文件夹,删除所有内容,然后执行步骤1。(这肯定会解决这个问题。)
我用了第三种方法,意思就是将你的maven仓库全删掉,重新下载一遍,使用以下流程:

1、找到你的maven仓库包位置,删掉repository文件夹下的所有文件,

2、然后右击项目->maven->update maven configuration...

offline和fore update of snapssots/Releases(强制更新)一定要勾选上,

下载完之后你会发现,问题解决了!!!

如果还不能解决,在pom文件加个依赖:

<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.3</version>
</dependency>
我就是 这么解决的!
---------------------
作者:戴瑞、
来源:CSDN
原文:https://blog.csdn.net/qq_27184497/article/details/80091294
版权声明:本文为博主原创文章,转载请附上博文链接!

maven pom文件报错:Multiple annotations found at this line 解决方案(转)的更多相关文章

  1. hibernate和mybatis出现配置文件xml的文件报错Multiple annotations found at this line(转)

    hibernate中的xml配置文件Multiple annotations found at this line,出现这个红叉报错,直接是把 <?xml version="1.0&q ...

  2. 异常-----web.xml文件报错 Multiple annotations found at this line: - cvc-complex-type.2.4.b: The content of element 'welcome-file-list' is not complete. One of '{"http://java.sun.c

    1,检查抬头是不是有问题. <?xml version="1.0" encoding="UTF-8"?><web-app version=&q ...

  3. web.xml里报错:Multiple annotations found at this line:

    在web.xml 中添加错误页面配置,出现了这个报错 具体情况是这样的: 错误信息: Multiple annotations found at this line: - cvc-complex-ty ...

  4. eclipse导入项目报错multiple annotations found at this line

    eclipsewindow-->preference-->Valdation-->将Manual和Build下复选框全部取消选择

  5. Maven无法导入插件,pom文件报错

    最近在使用IDEA导入开源项目bootshiro,更新依赖的时候,发现有些插件无法导入,以致于pom文件一直报找不到该插件的错误 一开始就网上各种百度,无论怎么更换阿里云的镜像都导不进,最后想着试试自 ...

  6. dubbo spring pom文件报错:提示no declaration can be found for element 'dubbo:service'.

    pom文件报错:The matching wildcard is strict, but no declaration can be found for  element 'dubbo:service ...

  7. spring pom文件报错:提示no declaration can be found for element 'dubbo:service'.

    转自:http://blog.csdn.net/happylife_haha/article/details/52755425 pom文件报错:The matching wildcard is str ...

  8. 关于maven导入工程pom文件报错问题及解决

    pom文件头报错 1.导入maven文件,经常遇到表头出错问题.报错:Failure to transfer org.apache.maven.shared:maven-filtering:pom:1 ...

  9. pom文件报错org.apache.maven.archiver.mavenarchiver.getmanifest

    eclipse导入新的maven项目时,pom.xml第一行报错: org.apache.maven.archiver.MavenArchiver.getManifest(org.apache.mav ...

随机推荐

  1. MachineLearning:

    https://github.com/pennyliang/MachineLearning-C---code https://zhuanlan.zhihu.com/p/22794772 http:// ...

  2. [daily][grub2] grub2修改内核选项

    以前, 我们就直接去修改 /boot/grub/grub.cfg 文件了. 其实这并不正确. 正确的做法是: 1.  修改 /etc/default/grub 文件. [root@dpdk ~]# c ...

  3. Python多线程中阻塞(join)与锁(Lock)的使用误区

    参考资料:https://blog.csdn.net/cd_xuyue/article/details/52052893 1使用两个循环分别处理start和join函数.即可实现并发. threads ...

  4. cxgridchart饼状图

    var VIEW:TcxGridDBChartView; Level:TcxGridLevel; Series:TcxGridDBChartSeries; begin View := cxGrid1. ...

  5. go不在dock显示运行

    用这种方法就可以了go build -ldflags -H=windowsgui XXX.go

  6. java怎么实现统计一个字符串中字符出现的次数

    问题:假设字符串仅仅保护a-z 的字母,java怎么实现统计一个字符串中字符出现的次数?而且,如果压缩后的字符数不小于原始字符数,则返回. 处理逻辑:首先拆分字符串,以拆分出的字符为key,以字符出现 ...

  7. eslint 在VSCode中不能使用

    在VSCode中安装号eslint插件,还是不能使用,还需安装 npm install eslint-plugin-promise --save-dev 我也不知道为什么?我现在只是用两天不到vsco ...

  8. DNS搜索

    dig(Domain Information Groper) dig @dnsserver name querytype 如果你设置的dnsserver是一个域名,那么dig会首先通过默认的上连DNS ...

  9. FFmpeg 裁剪——音频解码

    配置ffmpeg,只留下某些音频的配置: ./configure --enable-shared --disable-yasm --enable-memalign-hack --enable-gpl ...

  10. 为什么要使用 Docker(二)

    作为一种新兴的虚拟化方式,Docker 跟传统的虚拟化方式相比具有众多的优势. 更高效的利用系统资源 由于容器不需要进行硬件虚拟以及运行完整操作系统等额外开销,Docker 对系统资源的利用率更高.无 ...