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

来源:互联网 发布:cos鞋淘宝店铺推荐 编辑:程序博客网 时间:2024/05/27 20:04

创建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 

至此,问题解决!!!






0 0
原创粉丝点击