由于缺少类,maven-ant-run插件失败

时间:2012-06-04 05:03:08

标签: java maven-3

早些时候我正在使用maven存储库下载所有工件,因此我的项目成功构建。但是,当我删除我的本地仓库并使我的神器作为maven网站的镜像..我在使用maven 3.0.4构建时出现此错误:

NFO] ------------------------------------------------------------------------
RROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.5:run (default) on project leida-runtime: Execution default of
oal org.apache.maven.plugins:maven-antrun-plugin:1.5:run failed: Unable to load the mojo 'run' in the plugin 'org.apache.maven.plugins:mav
-antrun-plugin:1.5'. A required class is missing: org/apache/tools/ant/BuildException
RROR] -----------------------------------------------------
RROR] realm =    plugin>org.apache.maven.plugins:maven-antrun-plugin:1.5
RROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
RROR] urls[0] = file:/C:/Documents%20and%20Settings/user/.m2/repository/org/apache/maven/plugins/maven-antrun-plugin/1.5/maven-antrun-
ugin-1.5.jar
RROR] urls[1] = file:/C:/Documents%20and%20Settings/user/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.1/plexus-interpolat
n-1.1.jar
RROR] urls[2] = file:/C:/Documents%20and%20Settings/user/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
RROR] urls[3] = file:/C:/Documents%20and%20Settings/user/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar
RROR] urls[4] = file:/C:/Documents%20and%20Settings/user/.m2/repository/org/apache/ant/ant-nodeps/1.8.1/ant-nodeps-1.8.1.jar
RROR] Number of foreign imports: 1
RROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

我已经为maven-antrun-plugin购买了jar,它有一个Ant-run类。还有另一个jar org.apache.ant1.8.1 jar这个类 org / apache / tools / ant / BuildException 也存在我仍然得到这个错误..我无法得到如何解决这个问题。谢谢。

1 个答案:

答案 0 :(得分:0)

也许m2 / repository / org / apache / ant / ant / 1.8.1 / ant-1.8.1.jar文件已损坏。您应该删除m2 / repository / org / apache / ant / ant / 1.8.1目录并重试。