解决maven插件问题:'无法加载魔力'

发布于 2024-10-25 19:03:58 字数 491 浏览 1 评论 0原文

我已经通过 maven 配置了我的 pom.xml 中的所有依赖项。当我发出命令 mvn install 时,出现以下错误:

[INFO] 插件管理器执行目标时出现内部错误 'org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test': 无法 加载魔力 'org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test' 在 插件“org.apache.maven.plugins:maven-surefire-plugin”。必填项 缺少类: org/apache/maven/surefire/util/NestedCheckedException org.apache.maven.surefire.util.NestedCheckedException

如何解决此问题?

I have configured all the dependencies in my pom.xml through maven. When i give the command mvn install I get the following error:

[INFO] Internal error in the plugin manager executing goal
'org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test': Unable to
load the mojo
'org.apache.maven.plugins:maven-surefire-plugin:2.4.3:test' in the
plugin 'org.apache.maven.plugins:maven-surefire-plugin'. A required
class is missing:
org/apache/maven/surefire/util/NestedCheckedException
org.apache.maven.surefire.util.NestedCheckedException

How can I resolve this problem?

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

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

发布评论

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

评论(5

浪漫之都 2024-11-01 19:03:58

您似乎遇到了以下问题:SUREFIRE-85

最可能的原因是本地存储库中的 jar 文件损坏。尝试从本地存储库中清除所有 Maven jar。从 /.m2/repository/org/apache/maven 中删除所有内容并再次运行构建。

另外,请确保您使用的是稳定的最新版本的 Maven。

You appear to be experiencing this issue: SUREFIRE-85.

The most likely cause appears to be corrupt jar files in your local repository. Try clearing out all maven jars from your local repository. Remove everything from <your-home-directory>/.m2/repository/org/apache/maven and run the build again.

Also, make sure you're using a stable, up-to-date version of Maven.

ぇ气 2024-11-01 19:03:58

我刚刚遇到这个问题,通过删除 org 目录并重建它解决了这个问题。

I just had this issue and by deleting the org directory and rebuilding this solved the issue.

土豪我们做朋友吧 2024-11-01 19:03:58

当我构建maven项目(JAVA)时,我收到“无法执行mojo”错误,我注意到它也无法获取我在.batch_profile中添加的JAVA_HOME路径,手动导出JAVA home问题已解决。看起来在很多情况下都可能会发生此构建问题,但检查系统环境变量可能会有所帮助......大卫

I got "unable to exe mojo" error when I build a maven project (JAVA), I noticed it also failed to get JAVA_HOME path which i added in my .batch_profile, manually export JAVA home problem resolved. it looks in many cases this build problem could happen but check system env variable might help ... David

挖个坑埋了你 2024-11-01 19:03:58
Using: Maven 3.0.5 required surefire:>2.10. 2.10 failed:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project robot-arm: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test failed: A required class was missing while executing org.apache.maven.plugins:maven-surefire-plugin:2.10:test: org/apache/maven/surefire/util/NestedCheckedException

2.11有效。
2.17有效。

Using: Maven 3.0.5 required surefire:>2.10. 2.10 failed:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project robot-arm: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test failed: A required class was missing while executing org.apache.maven.plugins:maven-surefire-plugin:2.10:test: org/apache/maven/surefire/util/NestedCheckedException

2.11 works.
2.17 works.

蓝天 2024-11-01 19:03:58

我解决了在 pom.xml 中升级插件版本的问题 1.17 失败 1.30.1 OK

I solved upgrading the plug in version in my pom.xml 1.17 failed 1.30.1 OK

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