ECLIPSE:建立失败

时间:2018-02-21 08:18:05

标签: java eclipse apache ant

我正在尝试在Eclipse Oxygen中构建一个JAVA EE项目。我的系统有Apache ANT版本1.10.2,Eclipse ANT Runtime的版本为1.10.1。 在构建我项目的相关xml时,我收到以下错误:

 [exec] BUILD FAILED
 [exec] java.lang.NoSuchMethodError: org.apache.tools.ant.launch.Locator.fromJarURI(Ljava/lang/String;)Ljava/lang/String;
 [exec]     at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:255)
 [exec]     at org.apache.tools.ant.helper.ProjectHelper2.parseUnknownElement(ProjectHelper2.java:130)
 [exec]     at org.apache.tools.ant.helper.ProjectHelper2.parseAntlibDescriptor(ProjectHelper2.java:110)
 [exec]     at org.apache.tools.ant.taskdefs.Antlib.createAntlib(Antlib.java:91)
 [exec]     at org.apache.tools.ant.taskdefs.Definer.loadAntlib(Definer.java:425)
 [exec]     at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:277)
 [exec]     at org.apache.tools.ant.ComponentHelper.checkNamespace(ComponentHelper.java:874)
 [exec]     at org.apache.tools.ant.ComponentHelper.getDefinition(ComponentHelper.java:307)
 [exec]     at org.apache.tools.ant.ComponentHelper.createComponent(ComponentHelper.java:284)
 [exec]     at org.apache.tools.ant.ComponentHelper.createComponent(ComponentHelper.java:263)
 [exec]     at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:429)
 [exec]     at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:163)
 [exec]     at org.apache.tools.ant.Task.perform(Task.java:347)
 [exec]     at org.apache.tools.ant.Target.execute(Target.java:435)
 [exec]     at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:179)
 [exec]     at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:93)
 [exec]     at org.apache.tools.ant.Main.runBuild(Main.java:826)
 [exec]     at org.apache.tools.ant.Main.startAnt(Main.java:235)
 [exec]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
 [exec]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
 [exec] Total time: 0 seconds
 [exec] java.lang.NoSuchMethodError: org.apache.tools.ant.launch.Locator.fromJarURI(Ljava/lang/String;)Ljava/lang/String;
 [exec]     at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:255)
 [exec]     at org.apache.tools.ant.helper.ProjectHelper2.parseUnknownElement(ProjectHelper2.java:130)
 [exec]     at org.apache.tools.ant.helper.ProjectHelper2.parseAntlibDescriptor(ProjectHelper2.java:110)
 [exec]     at org.apache.tools.ant.taskdefs.Antlib.createAntlib(Antlib.java:91)
 [exec]     at org.apache.tools.ant.taskdefs.Definer.loadAntlib(Definer.java:425)
 [exec]     at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:277)
 [exec]     at org.apache.tools.ant.ComponentHelper.checkNamespace(ComponentHelper.java:874)
 [exec]     at org.apache.tools.ant.ComponentHelper.getDefinition(ComponentHelper.java:307)
 [exec]     at org.apache.tools.ant.ComponentHelper.createComponent(ComponentHelper.java:284)
 [exec]     at org.apache.tools.ant.ComponentHelper.createComponent(ComponentHelper.java:263)
 [exec]     at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:429)
 [exec]     at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:163)
 [exec]     at org.apache.tools.ant.Task.perform(Task.java:347)
 [exec]     at org.apache.tools.ant.Target.execute(Target.java:435)
 [exec]     at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:179)
 [exec]     at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:93)
 [exec]     at org.apache.tools.ant.Main.runBuild(Main.java:826)
 [exec]     at org.apache.tools.ant.Main.startAnt(Main.java:235)
 [exec]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
 [exec]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
 [exec] org.apache.tools.ant.launch.Locator.fromJarURI(Ljava/lang/String;)Ljava/lang/String;
BUILD FAILED

无法确定是由于版本冲突还是其他一些蚂蚁错误。

0 个答案:

没有答案