无法计算构建计划:找不到工件 org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3

发布于 2024-10-11 20:26:28 字数 234 浏览 4 评论 0原文

我在 Eclipse 中使用 m2eclipse 插件(版本 0.12.0.20101115-1102)构建错误:

无法计算构建计划:找不到工件 org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3

我双倍检查并且 maven-resources-plugin 在我的本地存储库以及 Maven Repo 中可用。

有人知道这里出了什么问题吗?

I'vea build error in Eclipse with m2eclipse plugin (version 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

I double checked and maven-resources-plugin is available in my local repository, as well as in Maven Repo.

Does anybody know what's wrong here ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

苹果你个爱泡泡 2024-10-18 20:26:29

似乎随着 m2eclipse 插件的新版本(0.12.1)而消失

Seems to be gone with new Version (0.12.1) of m2eclipse plugin

淤浪 2024-10-18 20:26:29

我必须从本地存储库中删除该文件夹,然后重新启动 eclipse。只需删除该文件夹即可将错误更改为 401 拒绝,然后重新启动即可完全删除下一个错误。

院长

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.

Dean

拥醉 2024-10-18 20:26:29

刚刚接触Maven,我也遇到过这个问题。通用解决方案,如发布在 无法计算构建计划:插件 org.apache.maven.plugins:maven-resources-plugin:2.5 或其依赖项之一无法解决 不过,对于仍然遇到此问题的开发人员来说,需要一个附加组件,因为它没有为我解决问题。我已经挣扎了一个多小时,并执行了以下操作来解决该问题:

  1. 确保 Maven 已正确安装。您可以通过命令提示符运行 mvn --version 来仔细检查。
  2. 关闭 Eclipse
  3. 删除存储库文件夹 (Users\$User$\.m2\repository) 中的所有文件
  4. 打开 Eclipse
  5. Project >清洁>清理所有项目>好的
    *允许清理完成
  6. 右键单击项目>梅文>更新项目
  7. 在弹出窗口中,确保选中“从 pom.xml 更新项目配置”和“清理项目”。
  8. 单击“确定”并允许 Maven 重新配置和下载项目的插件等。

注意:我运行的是 Windows 8.1,使用 JDK 1.7、Maven 3.2.5 和 Eclipse Juno。

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 resolved requires 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:

  1. Ensure that Maven has been installed correctly. You can double check by running mvn --version via command prompt.
  2. Close Eclipse
  3. Delete all files in the repository folder (Users\$User$\.m2\repository)
  4. Open Eclipse
  5. Project > Clean > Clean All Projects > OK
    *Allow the clean to complete
  6. Right click on project > Maven > Update Project
  7. In the pop-up, ensure that "Update project configuration from pom.xml" and "Clean Projects" is ticked.
  8. Click on Ok and allow Maven to reconfigure and download your project's plugins etc.

Note: I'm running Windows 8.1, using JDK 1.7, Maven 3.2.5 and Eclipse Juno.

情域 2024-10-18 20:26:29

我正是遇到这个问题。今天我首先安装了 Maven 并使用了它。检查我是否可以在命令提示符下使用它。然后我尝试从日食。下载m2e,并创建一个新的maven项目。被 Eclipse 告知“无法计算构建计划:找不到工件 org.apache.maven.plugins:... bla bla bla”。

解决方案:转到.m2并删除存储库文件夹。刷新 eclipse (或重新启动它)。现在可以了!

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".

Solution: go to .m2 and delete the repository folder. Refresh eclipse (or restart it). Now it works!

你的笑 2024-10-18 20:26:29

我找到了解决这个问题的方法,我尝试了很多方法,终于成功解决了这个问题。请按照以下步骤操作。

  1. 在 Eclipse 中转到“Windows”--> “首选项”
  2. 选择“Maven”,然后选择“用户设置”
  3. 您将看到两个文件,一个是“全局设置”,另一个是“用户设置”
  4. 如果您使用的是外部 Maven 安装,则设置路径
    外部 Maven 包的“settings.xml”文件。
  5. 如果您使用的是 eclipse 嵌入式 Maven,那么它是默认设置的。
  6. 在这两种情况下,您都需要编辑“settings.xml”文件中的代理设置,并在文件中添加您的主机和端口号。
  7. 现在应用设置,您可以看到问题现已解决。如果
    不行,重启eclipse,清理并更新Maven项目。

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.

  1. In eclipse go to 'windows' --> 'preferences'
  2. select 'Maven' and then select 'UserSettings'
  3. You'll see two files, one 'Global-settings' another 'User-settings'
  4. If you are using an external Maven installation, then set the path
    for the 'settings.xml' file of your external Maven package.
  5. If you are using eclipse embedded Maven, then it is set by default.
  6. 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.
  7. Now apply the settings and you can see the issue now resolved. If
    not, restart the eclipse, clean and update the Maven project.
帅的被狗咬 2024-10-18 20:26:28

您的项目 pom.xml 中是否定义了 maven-resources-plugin?

<plugin>
  <groupid>org.apache.maven.plugins</groupid>
  <artifactid>maven-resources-plugin</artifactid>
  <version>2.4.3</version>
</plugin>

甚至尝试从本地存储库中删除该文件夹并让它再次下载 jar。

Do you have the maven-resources-plugin defined in your project pom.xml?

<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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文