码迷,mamicode.com
首页 > Web开发 > 详细

一个maven错误:org/apache/maven/shared/filtering/MavenFilteringException

时间:2015-04-12 10:42:03      阅读:349      评论:0      收藏:0      [点我收藏+]

标签:

电脑重启后不知道为啥eclipse中的maven不能用了,pom文件一直标红,报以下错误:

Execution default-cli of goal org.apache.maven.plugins:maven-resources-plugin:2.5:copy-resources failed: A required class was missing while executing org.apache.maven.plugins:maven-resources-plugin:2.5:copy-resources: org/apache/maven/shared/filtering/MavenFilteringException

-----------------------------------------------------
realm =    plugin>org.apache.maven.plugins:maven-resources-plugin:2.5
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/C:/Users/admin/.m2/repository/org/apache/maven/plugins/maven-resources-plugin/2.5/maven-resources-plugin-2.5.jar
urls[1] = file:/C:/Users/admin/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
Number of foreign imports: 1

import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

但是在.m2下maven插件:maven-resources-plugin的确是存在的,而且版本号的确是2.5技术分享

解决办法,在pom文件中增加:

    <plugins>
        <plugin>  
   <groupId>org.apache.maven.plugins</groupId>  
   <artifactId>maven-resources-plugin</artifactId>  
   <version>2.4.3</version>  
   <configuration>  
       <encoding>utf-8</encoding>  
   </configuration>  
</plugin> 
    </plugins>

具体原因以后再查。

一个maven错误:org/apache/maven/shared/filtering/MavenFilteringException

标签:

原文地址:http://blog.csdn.net/achilles12345/article/details/45007897

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!