Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resolve maven plugin issue: ' Unable to load mojo'

Tags:

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?

like image 734
kiara Avatar asked Mar 23 '11 08:03

kiara


People also ask

What is Mojo in Maven terms?

What is a Mojo? A mojo is a Maven plain Old Java Object. Each mojo is an executable goal in Maven, and a plugin is a distribution of one or more related mojos. Introduction to Plugin Development - Introduction to concepts.

What is cobertura Maven plugin?

This is the Mojo's Maven plugin for Cobertura. Cobertura is a free Java tool that calculates the percentage of code accessed by tests. It can be used to identify which parts of your Java program are lacking test coverage.

How do I update my Maven?

icon in the Maven tool window to open the Maven settings. Select Repositories from options on the left. On the Repositories page, click Update to update Maven repositories. After the update is finished, click OK.


2 Answers

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.

like image 149
joelittlejohn Avatar answered Sep 24 '22 05:09

joelittlejohn


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

like image 43
Lyndon Avatar answered Sep 21 '22 05:09

Lyndon