dcsimg
New to Apache ant,problem with build.xml
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   kaushik_bhatt
Posted On:   Thursday, March 18, 2004 11:08 PM

ANT: I have just downloaded ANT from Apache, and unzipped it to ant in C:
I have set JAVA_HOME, and ANT_HOME variables, and I have placed the ant in into the classpath.
On the command line, when I type "ant" --- I get:
Buildfile: build.xml does not exist!
Build failed

I made a sample build.xml file and placed it in the ant folder, still it gives the same msg on command prompt...

So where is this build.xml file supposed to be stored? and/or what else am I missing ?

Re: New to Apache ant,problem with build.xml

Posted By:   satish_t  
Posted On:   Thursday, March 25, 2004 11:04 PM

ANT: I have just downloaded ANT from Apache, and unzipped it to ant in C: I have set JAVA_HOME, and ANT_HOME variables, and I have placed the antin into the classpath. On the command line, when I type "ant" --- I get: Buildfile: build.xml does not exist! Build failed I made a sample build.xml file and placed it in the ant folder, still it gives the same msg on command prompt... So where is this build.xml file supposed to be stored? and/or what else am I missing ?

Re: New to Apache ant,problem with build.xml

Posted By:   Anonymous  
Posted On:   Friday, March 19, 2004 02:39 AM

First: don´t set the CLASSPATH, set the PATH. Maybe that was a typo.


build.xml is the buildfile for a project. Usually is is in the projects root directory - not in Ant´s directory (there is Ant´s own :-) - src-distro). A very easy script:




Hello World




Quick test:


  1. create a directory C:ant-test

  2. create a file C:ant-testuild.xml

  3. copy the coding from above into that created build.xml

  4. open a command box (cmd.exe|command.com)

  5. cd to C:ant-test

  6. type in ant

  7. you should get a "[echo] Hello World"

About | Sitemap | Contact