解决 maven 插件问题:“无法加载 mojo" [英] Resolve maven plugin issue: ' Unable to load mojo'

查看:63
本文介绍了解决 maven 插件问题:“无法加载 mojo"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经通过 maven 配置了我的 pom.xml 中的所有依赖项.当我给出命令 mvn install 我得到以下错误:

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] 插件管理器执行目标中的内部错误'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/NestedCheckedExceptionorg.apache.maven.surefire.util.NestedCheckedException

[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

我该如何解决这个问题?

推荐答案

您似乎遇到了这个问题:SUREFIRE-85.

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

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

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.

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

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

这篇关于解决 maven 插件问题:“无法加载 mojo"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆