Multiple markers at this line - Plugin execution not covered by lifecycle configuration:

创建maven项目 pom.xml报错 报错信息如下:

 
 Multiple markers at this line
- 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-testCompile: PluginResolutionException: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: The following artifacts could not be resolved: com.google.collections:google-collections:jar:1.0, junit:junit:jar:3.8.2: Failure to transfer com.google.collections:google-collections:jar:1.0 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 com.google.collections:google-collections:jar:1.0 from/to central ( https://repo.maven.apache.org/maven2): The operation was cancelled.
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (execution: default-testCompile, phase: test-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 following artifacts could not be resolved: com.google.collections:google-collections:jar:1.0, junit:junit:jar:3.8.2: Failure to transfer com.google.collections:google-collections:jar:1.0 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 com.google.collections:google-collections:jar:1.0 from/to central ( https://repo.maven.apache.org/maven2): The operation was cancelled.



百度了一天。。最后问了老师  老师一句话 源错误在setting文件中中设置国内源。。解决了 害羞


详细说说:

生命周期配置没有包括maven-compiler-plugin:3.1插件的执行,于是扔百度上搜了搜,有人说是此插件未安装

好,试试吧 用命令行进入此jar所在目录,执行命令mvn install:install-file -Dfile=maven-compiler-plugin-3.1.jar-Dsources=src.jar -DgroupId=nuist  -DartifactId=HelloMaven2 -Dversion=1.1 -Dpackaging=jar

显示安装成功!

update项目,红叉叉还是在那里闪亮亮地呆着耶。。。


再百度下报错信息吧。

大多数是改pom.xml配置,于是照着他们说的各种改啊。。。没用。。。。



继续翻译报错信息



无法获取此插件执行的compilerId, 此插件或者其依赖不能解决,接下来所列举的几个jar包不能从maven源(https://repo.maven.apache.org)转移,啰嗦了半天 主要原因在这!!!—— Original error: Could not transfer artifact com.google.collections:google-collections:jar:1.0 from/to central (https://repo.maven.apache.org/maven2)  ---源错误,源中没有jar包!!!


到用户目录的.m2/settings.xml更改配置http://my.oschina.net/qjx1208/blog/201085

右击项目 maven update 

至此,问题解决!!!






评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值