eclipse导入maven project问题整理

1.Plugin execution not covered by lifecycle configuration: org.apache.rat:apache-rat-plugin:0.12:check (execution: validate, phase: validate)

在<plugins>标签外加上<pluginManagement>标签,如下:

<build>
    <pluginManagement>
        <plugins>
            ....
        </plugins>
    </pluginManagement>
</build>

2.Failure to transfer org.apache.maven.plugins:maven-war-plugin:pom:2.6 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-war-plugin:pom:2.6 from/to central (http://repo.maven.apache.org/maven2): The operation was cancelled.

这个问题是因为maven的plugin下没有找到对应的jar包,找到plugin对应的目录C:\User\.m2\repository\org\apache\maven\plugins\maven-war-plugin\2.6,没有找到maven-war-plugin-2.6.jar,这就是报错的原因,直接将C:\Users\Yuan\.m2\repository\org\apache\maven\plugins\maven-war-plugin下的2.6目录删除,然后右键项目,Maven  -> update project,此时再看C:\User\.m2\repository\org\apache\maven\plugins\maven-war-plugin\2.6目录下,应该已经出现了maven-war-plugin-2.6.jar,诸如此类报plugin没找到的错误,都是这样的解决方法。

猜你喜欢

转载自blog.csdn.net/eclothy/article/details/90713583
今日推荐