Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to load the mojo - maven install

Tags:

maven

I am trying to install a maven project at work and getting the following error. A bit of googling shows other people with the mojo problem, but none with the specific maven-war-plug and MavenFilteringException.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) on project genericIntegrationServer: Executio n default-war of goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war failed: Unable to load the mojo 'war' in the plugin 'org.apache.maven.plugin s:maven-war-plugin:2.1.1'. A required class is missing: org/apache/maven/shared/filtering/MavenFilteringException 

Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)

Maven home: C:\dev\apache-maven-3.0.3\bin..

Java version: 1.6.0_19, vendor: Sun Microsystems Inc.

Java home: c:\dev\jdk\1.6\1.6.0_19\jre

Default locale: en_GB, platform encoding: Cp1252

OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"

like image 520
edwardmlyte Avatar asked Dec 21 '11 09:12

edwardmlyte


People also ask

What is the latest version of Maven?

Apache Maven 3.8.6 is the latest release and recommended version for all users.

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 Maven war plugin?

The Maven WAR plugin is responsible for collecting and compiling all the dependencies, classes, and resources of the web application into a web application archive. There are some defined goals in the Maven WAR plugin: war: This is the default goal that is invoked during the packaging phase of the project.

What is Maven resources plugin?

The Resources Plugin handles the copying of project resources to the output directory. There are two different kinds of resources: main resources and test resources.


2 Answers

I had same issue. However, after running {Maven->Update Project} resolved the issue.

like image 145
Avinash Avatar answered Sep 18 '22 20:09

Avinash


When I had this problem, it seemed to be a problem with my Maven install.

Uninstalling the M2Eclipse plugin and deleting the .m2 folder on my drive, then reinstalling M2Eclipse seemed to fix it.

like image 36
Kevin Avatar answered Sep 18 '22 20:09

Kevin