Maven安装/编译失败

时间:2013-05-22 22:23:47

标签: maven-2

我遇到异常,当我在命令提示符/ eclipse中通过maven编译/安装时。

[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ dashboard ---
May 22, 2013 3:55:50 PM org.sonatype.guice.bean.reflect.Logs$JULSink warnWARNING: Error injecting: org.apache.maven.plugin.resources.ResourcesMojo java.lang.NoClassDefFoundError: org/apache/maven/shared/filtering/MavenFiltering
Exception
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2413)
        at java.lang.Class.getDeclaredConstructors(Class.java:1855)
        at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.
java:245)


[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.050s
[INFO] Finished at: Wed May 22 15:55:50 MDT 2013
[INFO] Final Memory: 9M/111M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources (default-resources) on project dashboard: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources failed: A required class was missing while executing org.apache.maven.plugins:maven-resources-plugin:2.5:resources: org/apache/maven/shared/filtering/MavenFilteringException

我尝试过更改存储库位置并删除存储库目录中的现有插件。

1 个答案:

答案 0 :(得分:1)

尝试另一个任务锁定maven过滤jar文件(.m2/repository/org/apache/maven/shared/maven-filtering/1.xx/maven-filtering-1.xx.jar)。在我的情况下,Eclipse以某种方式锁定了该文件。杀死那个任务和maven应该没问题。