Resolve maven plugin issue: ' Unable to load m

2019-03-14 19:23发布

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?

5条回答
Ridiculous、
2楼-- · 2019-03-14 19:57
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.

查看更多
狗以群分
3楼-- · 2019-03-14 19:58

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.

查看更多
聊天终结者
4楼-- · 2019-03-14 19:59

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

查看更多
你好瞎i
5楼-- · 2019-03-14 20:06

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

查看更多
祖国的老花朵
6楼-- · 2019-03-14 20:14

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

查看更多
登录 后发表回答