解决maven插件问题:'无法加载魔力'
我已经通过 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您似乎遇到了以下问题: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.
我刚刚遇到这个问题,通过删除 org 目录并重建它解决了这个问题。
I just had this issue and by deleting the org directory and rebuilding this solved the issue.
当我构建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
2.11有效。
2.17有效。
2.11 works.
2.17 works.
我解决了在 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