Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove org.apache.maven.plugin.jar.JarMojo error from pom editor

I am using Spring Tool Suite 3.1.0.RELEASE and the pom.xml file in every project that I create has a single error entitled "org.apache.maven.plugin.jar.JarMojo". No further error details.

This error is present even in the auto generated pom.xml when creating a new Spring Utility Project.

It does not cause any errors during build, it is only shown in the IDE (top of the Overview tab in the pom editor and first line of pom.xml).

org.apache.maven.plugin.jar.JarMojo error screenshot

Anyone seen this before and knows how to fix it? Google has not been helpful.

Here is the default pom.xml generated by my Spring Tool Suite for a Spring Utility Project (it causes the error described):

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.springframework.samples.spring</groupId>
    <artifactId>spring-utility</artifactId>
    <version>1.0.0.CI-SNAPSHOT</version>
    <packaging>jar</packaging>
    <name>Spring Utility</name>
    <url>http://www.springframework.org</url>
    <description>
        <![CDATA[
      This project is a minimal jar utility with Spring configuration.
    ]]>
    </description>
    <properties>
        <maven.test.failure.ignore>true</maven.test.failure.ignore>
        <spring.framework.version>3.0.6.RELEASE</spring.framework.version>
    </properties>   <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.7</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${spring.framework.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${spring.framework.version}</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.14</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>

        </plugins>
    </build> 
</project>
like image 519
Gavin S Avatar asked Feb 08 '13 07:02

Gavin S


1 Answers

Fixed. I downloaded Maven 3.0.5 separately and extracted to C:\springsource\apache-maven-3.0.5. (STS was using Maven 3.0.3) Then in STS went to Windows->Preferences from the menu, searched for "installations" to find the Maven installations page. Added a new installation by pointing to the folder above. Applied. Then right clicked on existing project and chose Maven->Update Project. Error gone.

All new projects also don't have the error anymore. Win.

like image 188
Gavin S Avatar answered Oct 04 '22 20:10

Gavin S