如何从pom编辑器中删除org.apache.maven.plugin.jar.JarMojo错误 [英] How to remove org.apache.maven.plugin.jar.JarMojo error from pom editor

查看:813
本文介绍了如何从pom编辑器中删除org.apache.maven.plugin.jar.JarMojo错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Spring Tool Suite 3.1.0.RELEASE,我创建的每个项目中的pom.xml文件都有一个名为org.apache.maven.plugin.jar.JarMojo的错误。没有进一步的错误细节

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.

创建新的Spring Utility项目时,即使在自动生成的pom.xml中也会出现此错误。

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

它在构建期间不会导致任何错误,它只显示在IDE中(pom编辑器中的Overview选项卡顶部和pom.xml的第一行)。

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).

之前有人见过这个并知道如何解决这个问题吗?谷歌没有帮助。

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

这是我的Spring Tool Suite为Spring Utility Project生成的默认pom.xml(导致所描述的错误):

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>


推荐答案

已修复。我单独下载了Maven 3.0.5并解压缩到C:\\pringsource \ apache-maven-3.0.5。 (STS正在使用Maven 3.0.3)然后在STS从菜单中转到Windows-> Preferences,搜索安装以找到Maven安装页面。通过指向上面的文件夹添加了新安装。应用。然后右键单击现有项目并选择Maven-> Update Project。错误消失。

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.

这篇关于如何从pom编辑器中删除org.apache.maven.plugin.jar.JarMojo错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆