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

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

4

1 回答 1

1

尝试其他任务是否锁定了 maven-filtering jar 文件 ( .m2/repository/org/apache/maven/shared/maven-filtering/1.xx/maven-filtering-1.xx.jar)。就我而言,Eclipse 以某种方式锁定了该文件。杀死那个任务,maven应该没问题。

于 2014-04-01T09:21:22.877 回答