eclipse 无法计算构建计划:找不到工件 org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4656270/
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
Could not calculate build plan: Could not find artifact org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3
提问by lweller
I'vea build error in Eclipse with m2eclipse plugin (version 0.12.0.20101115-1102):
我在 Eclipse 中使用 m2eclipse 插件(版本 0.12.0.20101115-1102)构建错误:
Could not calculate build plan: Could not find artifact org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3
无法计算构建计划:找不到工件 org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3
I double checked and maven-resources-plugin is available in my local repository, as well as in Maven Repo.
我仔细检查了 maven-resources-plugin 在我的本地存储库以及 Maven Repo 中可用。
Does anybody know what's wrong here ?
有人知道这里出了什么问题吗?
采纳答案by lweller
Seems to be gone with new Version (0.12.1) of m2eclipse plugin
m2eclipse插件的新版本(0.12.1)似乎已经消失了
回答by Choesang
Do you have the maven-resources-plugin defined in your project pom.xml?
你的项目 pom.xml 中定义了 maven-resources-plugin 吗?
<plugin>
<groupid>org.apache.maven.plugins</groupid>
<artifactid>maven-resources-plugin</artifactid>
<version>2.4.3</version>
</plugin>
Even try deleting the folder from your local repository and let it download the jar again.
甚至尝试从本地存储库中删除该文件夹并让它再次下载 jar。
回答by Ryan
New to Maven, I also experienced this problem. The generic solution, as posted on Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolvedrequires an add-on though, for developers who are still experiencing this problem, as it did not solve the problem for me. I've been struggling for more than an hour already and did the following to resolve the issue:
Maven 新手,我也遇到过这个问题。通用解决方案,如无法计算构建计划:插件 org.apache.maven.plugins:maven-resources-plugin:2.5 或其依赖项之一无法解决需要一个附加组件,但对于仍然是遇到这个问题,因为它没有为我解决问题。我已经挣扎了一个多小时了,并做了以下事情来解决这个问题:
- Ensure that Maven has been installed correctly. You can double check by running
mvn --version
via command prompt. - Close Eclipse
- Delete all files in the repository folder (Users\$User$\.m2\repository)
- Open Eclipse
- Project > Clean > Clean All Projects > OK *Allow the clean to complete
- Right click on project > Maven > Update Project
- In the pop-up, ensure that "Update project configuration from pom.xml" and "Clean Projects" is ticked.
- Click on Ok and allow Maven to reconfigure and download your project's plugins etc.
- 确保 Maven 已正确安装。您可以
mvn --version
通过命令提示符运行来仔细检查。 - 关闭日食
- 删除存储库文件夹中的所有文件 (Users\$User$\.m2\repository)
- 打开日食
- 项目 > 清理 > 清理所有项目 > 确定 *允许清理完成
- 右键单击项目> Maven > 更新项目
- 在弹出窗口中,确保勾选“从 pom.xml 更新项目配置”和“清理项目”。
- 单击“确定”并允许 Maven 重新配置和下载您项目的插件等。
Note: I'm running Windows 8.1, using JDK 1.7, Maven 3.2.5 and Eclipse Juno.
注意:我运行的是 Windows 8.1,使用 JDK 1.7、Maven 3.2.5 和 Eclipse Juno。
回答by Dean Hiller
I had to delete the folder from the local repository AND THEN restart eclipse. Just deleting the folder changed the error to a 401 denied for me and then a restart removed that next error completely.
我不得不从本地存储库中删除该文件夹,然后重新启动 eclipse。只需删除文件夹即可将错误更改为 401 拒绝我,然后重新启动完全消除了下一个错误。
Dean
院长
回答by user3083009
I had exactly this problem. Today I first setup maven and played around with it. Checked that I could use it with command prompt. Then I tried from eclipse. Downloaded m2e, and created a new maven project. Was told by eclipse "Could not calculate build plan: Could not find artifact org.apache.maven.plugins:... bla bla bla".
我正是有这个问题。今天我首先设置了 maven 并使用了它。检查我是否可以在命令提示符下使用它。然后我从 eclipse 开始尝试。下载了 m2e,并创建了一个新的 maven 项目。被 Eclipse 告知“无法计算构建计划:找不到工件 org.apache.maven.plugins:... bla bla bla”。
Solution: go to .m2 and delete the repository folder. Refresh eclipse (or restart it). Now it works!
解决方案:转到 .m2 并删除存储库文件夹。刷新 eclipse(或重新启动它)。现在它起作用了!
回答by Karthic.K
I've found a way to solve this issue, I tried many things and finally managed to resolve this issue. please follow the below steps.
我找到了解决这个问题的方法,我尝试了很多东西,最终设法解决了这个问题。请按照以下步骤操作。
- In eclipse go to 'windows' --> 'preferences'
- select 'Maven' and then select 'UserSettings'
- You'll see two files, one 'Global-settings' another 'User-settings'
- If you are using an external Maven installation, then set the path for the 'settings.xml' file of your external Maven package.
- If you are using eclipse embedded Maven, then it is set by default.
- in both the cases you need to edit the proxy setting in the 'settings.xml' file, add your Host and port number in the file.
- Now apply the settings and you can see the issue now resolved. If not, restart the eclipse, clean and update the Maven project.
- 在 Eclipse 中,转到“windows”-->“preferences”
- 选择“Maven”,然后选择“UserSettings”
- 您将看到两个文件,一个是“全局设置”,另一个是“用户设置”
- 如果您使用的是外部 Maven 安装,则设置外部 Maven 包的“settings.xml”文件的路径。
- 如果您使用 Eclipse 嵌入式 Maven,则默认设置。
- 在这两种情况下,您都需要在“settings.xml”文件中编辑代理设置,在文件中添加您的主机和端口号。
- 现在应用设置,您可以看到问题现已解决。如果没有,重启eclipse,清理并更新Maven项目。