NutzCN Logo
问答 NB Maven compiler-plugin 引用报错
发布于 2136天前 作者 qq_44788994 1902 次浏览 复制 上一个帖子 下一个帖子
标签:

在向Eclipse 导入一个 NB生成的项目时子项目 pom 文件报错

CoreException: Could not get the value for parameter compilerId for plugin execution default-compile: PluginResolutionException: Plugin org.apache.maven.plugins:maven-compiler-plugin:3.7.0 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven:maven-plugin-api:jar:3.0, org.apache.maven:maven-model:jar:3.0, org.sonatype.sisu:sisu-inject-plexus:jar:1.4.2, org.apache.maven:maven-artifact:jar:3.0, org.codehaus.plexus:plexus-utils:jar:2.0.4, org.apache.maven:maven-core:jar:3.0, org.apache.maven.shared:maven-shared-utils:jar:3.1.0, org.codehaus.plexus:plexus-component-annotations:jar:1.6, org.codehaus.plexus:plexus-java:jar:0.9.2, org.codehaus.plexus:plexus-compiler-api:jar:2.8.2, org.codehaus.plexus:plexus-compiler-manager:jar:2.8.2, org.codehaus.plexus:plexus-compiler-javac:jar:2.8.2: Failure to transfer org.apache.maven:maven-plugin-api:jar:3.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 org.apache.maven:maven-plugin-api:jar:3.0 from/to central (https://repo.maven.apache.org/maven2): The operation was cancelled.

当前情况是,一开始出现这个问题,看某帖子中说并更新了 java SDK ,现在版本是 java 1.8 171并且也配置好了项目和Eclipse 的SDK以及环境变量
但是此问题还存在

报错位置为子项目 pom.xml parent 标签

父项目中写法

<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.7.0</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<compilerArgs>
						<arg>-parameters</arg>
					</compilerArgs>
					<useIncrementalCompilation>false</useIncrementalCompilation>
				</configuration>
			</plugin>

同时出现的错误还有
Plugin execution not covered by lifecycle configuration
求大神解决方案

6 回复

网络问题吧, 配个maven mirror应该会好

包正常下载成功的....而且也从别的电脑考过了 没用

把.m2删了,让它重新下一遍

maven-compiler-plugin 3.7.0 这个文件夹 删过,重新下过,也从别人的机器考过没有用的

是不是eclipse版本太低,所以不认?

刚才删除了 .m2 文件全部重新下载后就好了 奇怪......不知道为什么可能是maven-compiler-plugin引用的一些包出错了吧
这个包确实重新下过好几次都成功了

不过还是谢谢了~

添加回复
请先登陆
回到顶部