Java CoreException:无法获取插件执行默认编译的参数 compilerId 的值:PluginResolutionException

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/39926064/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 21:34:10  来源:igfitidea点击:

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

javaeclipsemaven

提问by chinmaya

Every time I am creating a mavensimple project i am getting below error. Please let me know what might the solution. I have tried many ways to resolve it but failed. what might be the reason?

每次我创建一个maven简单的项目时,我都会遇到错误。请让我知道可能的解决方案。我尝试了很多方法来解决它,但都失败了。可能是什么原因?

Is this because of eclipse or because of repository or any certificate issue?

这是因为 eclipse 还是因为存储库或任何证书问题?

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

CoreException:无法获取插件执行默认编译的参数 compilerId 的值:PluginResolutionException:插件 org.apache.maven.plugins:maven-compiler-plugin:3.1

enter image description here

在此处输入图片说明

回答by u1516331

I have solved this by using the eclipse "Update Maven Project" (ALT+F5) feature end check the option "Force Update of Snapshots/Releases".

我已经通过使用 Eclipse“更新 Maven 项目”(ALT+F5)功能结束检查选项“强制更新快照/发布”解决了这个问题。

回答by Saurabh Agrawal

Yes, if you read the error details, it says, plugin is cached and not pulled/pushed from/to remote repository. Hence we should do force update, by using the eclipse "Update Maven Project" feature and check the option "Force Update of Snapshots/Releases".

是的,如果您阅读错误详细信息,它会说,插件已缓存,而不是从/向远程存储库拉/推。因此,我们应该通过使用 Eclipse 的“更新 Maven 项目”功能并选中“强制更新快照/发布”选项来强制更新。

回答by subhashis

The best approach is, go to the working directory through command prompt where pom.xml was available and execute the command mvn clean package -U

最好的方法是,通过命令提示符进入 pom.xml 可用的工作目录并执行命令mvn clean package -U

回答by Weipeng Liu

  • Check Update Maven Project(ALT+F5) feature;
  • Click on the option Force Update of Snapshots/Releases.
  • 检查更新 Maven 项目(ALT+F5) 功能;
  • 单击选项Force Update of Snapshots/Releases

It should work just fine.

它应该工作得很好。

回答by KartickS

If the same project is opened in another eclipse or any other IDE in parallel and while trying to build the same project I got the same error. After closing it and rebuild the same, it's resolved

如果在另一个 eclipse 或任何其他 IDE 中并行打开同一个项目,并且在尝试构建同一个项目时,我会遇到同样的错误。关闭它并重建它后,它解决了

回答by KC_911723

Yes, when we check "Force Update of Snapshots/Releases" for Updating maven project the error is resolved and it works fine.

是的,当我们检查“强制更新快照/发布”以更新 Maven 项目时,错误已解决并且工作正常。

  • Press ALT+F5 to open sub-window "Update Maven Project" feature or You can right click on your project -> Maven -> Update Project
  • Check the option "Force Update of Snapshots/Releases"
  • 按 ALT+F5 打开子窗口“更新 Maven 项目”功能或您可以右键单击您的项目 -> Maven -> 更新项目
  • 选中“强制更新快照/发布”选项

回答by Purna Pattanayak

The best approach is, go to the working directory through command prompt where pom.xml was available and execute the command mvn clean package -U

最好的方法是,通过命令提示符进入 pom.xml 可用的工作目录并执行命令mvn clean package -U

This methods works like a magic in any maven issues.

这种方法在任何 Maven 问题中都像魔术一样工作。

回答by mahesh deshmukh

Add compiler plugin to pom.xml and then update maven project

将编译器插件添加到 pom.xml 然后更新 maven 项目

Right click on project -> Maven -> Update Project

右键单击项目 -> Maven -> 更新项目

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

回答by Mohd Yusuf

I also faced the same issue and the trick:

我也遇到了同样的问题和诀窍:

Alt + f5 and > Update Maven Project> check the checkboxForce Update of Snapshots/ReleasesWait for the process to be completed.

Alt + f5 and > Update Maven Project> 选中复选框Force Update of Snapshots/Releases等待进程完成。

回答by yashwanth numburi

There are two things you can do if you get this error.

如果出现此错误,您可以做两件事。

  1. Update mavenproject and select force update
  2. Use mavencommand mvn clean package -U
  1. 更新maven项目并选择强制更新
  2. 使用maven命令mvn clean package -U

These two has worked for me.

这两个对我有用。