cmd中的build.xml不存在错误 [英] build.xml does not exist error in cmd

查看:871
本文介绍了cmd中的build.xml不存在错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows 7中安装ant后。在cmd中我键入了

After the installation of ant in windows 7 . In cmd i typed

ant -version;

它给出了ant版本。



it's given the ant version.

C:\Users\lcladmin>ant -version;
Apache Ant(TM) version 1.9.1 compiled on May 15 2013





然后我输入



Then I typed

ant -f build.xml;

它给了我以下错误。



and it gave me following error.

C:\Users\lcladmin>ant -f build.xml;
Buildfile: build.xml does not exist!
Build failed





这是什么原因?我将build.xml文件放在eclipse项目的build文件夹中。



buid.xml path-> D:\ workspace \ BankDemo \ build \ build.xml



ant path-> D:\ant



What the reason for that? I placed build.xml file in the eclipse project's build folder.

buid.xml path-> D:\workspace\BankDemo\build\build.xml

ant path->D:\ant

推荐答案

目录C:\ Users\lcladmin似乎是运行ant的上下文,因此ant希望build.xml文件存在。



我想如果你想在eclipse项目的build文件夹中看到它,你需要从Eclipse IDE中激活它。您正在尝试从命令行运行,这是一个不同的上下文...
The directory "C:\Users\lcladmin" seems to be the context where ant is running, and therefore where ant would expect the build.xml file to exist.

I think if you want it to be seen in the eclipse project's build folder, you need to activate it from the Eclipse IDE. You are attempting to run from the command line, which is a different context...


这篇关于cmd中的build.xml不存在错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆