gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-29 09:13:37 24 4
gpt4 key购买 nike

早些时候我使用 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 也存在,但我仍然收到此错误..我无法解决此问题..谢谢。

最佳答案

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

关于java - maven-ant-run 插件由于缺少类而失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10876508/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com