CoreException: Could not get the value for parameter compilerId for plugin execution default-compile

简介: CoreException: Could not get the value for parameter compilerId for plugin execution default-compile

新建maven项目,建立父工程没有报错,建子工程完了就报错了

20190616155055635.png

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: org.apache.maven:maven-artifact-manager:jar:2.0.9, org.apache.maven:maven-monitor:jar:2.0.9, org.apache.maven:maven-toolchain:jar:1.0, org.apache.maven.shared:maven-shared-utils:jar:0.1, com.google.code.findbugs:jsr305:jar:2.0.1, org.apache.maven.shared:maven-shared-incremental:jar:1.1, org.codehaus.plexus:plexus-component-annotations:jar:1.5.5,

org.codehaus.plexus:plexus-compiler-api:jar:2.2, org.codehaus.plexus:plexus-compiler-manager:jar:2.2, org.codehaus.plexus:plexus-compiler-javac:jar:2.2, org.codehaus.plexus:plexus-container-default:jar:1.5.5, org.codehaus.plexus:plexus-classworlds:jar:2.2.2,

org.apache.xbean:xbean-reflect:jar:3.4, log4j:log4j:jar:1.2.12, commons-logging:commons-logging-api:jar:1.1, com.google.collections:google-collections:jar:1.0, junit:junit:jar:3.8.2: Failure to transferorg.apache.maven:maven-artifact-manager:jar:2.0.9 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-artifact-manager:jar:2.0.9 from/to central

(https://repo.maven.apache.org/maven2): The operation was cancelled.

鼠标停在红线处就会出现错误的详细信息

网上查了,这种错误一般都是缺少文件,而根据上图报错提示,这次是因为maven本地仓库中缺少maven-resource-plugin:2.6这个相应的依赖文件;

首先在报错项目的pom.xml中输入

  <dependencies>
     <dependency>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-resources-plugin</artifactId>
     <version>2.6</version>
    </dependency>
  </dependencies>

然后打开cmd在项目的根目录输入: mvn install 自动补全缺失文件

右键报错项目,单击Maven-Update Project 勾选Force Update of Snapshots/Releases这个选项,点击OK按钮,发现错误已经消失。

2.勾选

3.大功告成

.

目录
相关文章
target\surefire-reports for the individual test results
target\surefire-reports for the individual test results
666 0
|
Java Maven
Maven3 package时报 &#39;version&#39; contains an expression but should be a constant
父pom文件: 4.0.0 com.wey WEY ${com.wey.version} pom 子Module 4.0.0 com.wey WEY ${com.wey.version} pom package web工程时报 'version' contains an expression but should be a constant这个错误提示,这是因为Maven3 不允许出现version为非常量值的情况。
9290 0
|
11月前
|
Java Apache Maven
Maven 的Could not calculate build plan错误解决方法(不一定适用,看原因)
Maven 的Could not calculate build plan错误解决方法(不一定适用,看原因)
|
Java Maven
[ERROR] Failed to execute goal on project springcloud: Could not resolve dependencies for project co
[ERROR] Failed to execute goal on project springcloud: Could not resolve dependencies for project co
709 0
[ERROR] Failed to execute goal on project springcloud: Could not resolve dependencies for project co
|
Java Maven Android开发
eclipse maven 报错Could not get the value for parameter encoding for plugin execution default
问题描述:更改默认的maven仓库路径完成后、即存maven项目或者新建maven项目的时候出现如下错误   Could not get the value for parameter encoding for plugin execution default   原因分析:当问题解决后、回...
1808 1
Module build failed: ReferenceError: Unknown plugin “import” specified in “base” at 0 Ask Question
https://stackoverflow.com/questions/42731610/module-build-failed-referenceerror-unknown-plugin-import-specified-in-base ...
3960 0
|
XML Java 数据格式
Java微信开发_Exception_01_The type org.xmlpull.v1.XmlPullParser cannot be resolved. It is indirectly referenced from required .class files
一、源码: package com.souvc.weixin.util; import java.io.InputStream; import java.io.Writer; import java.
1296 0