I need to develop application using spring.For this i need to install ant.I have installed ant in the path c: . but when i type ant in the cmd prompt, the following error exist:
So where is the build.xml file? If it's not in the directory where you're executing the command, then you need to tell Ant where to find it using the "-file" switch.
You can run only one of them at any given time. So you need to pass the path to whichever one you want to run as argument to the "-file" parameter.
C:\Documents and Settings\peopleTech>ant -find build.xml
The parameter is called "-file", not "-find". This only works if the build.xml file is in the current directory. If it's in a subdirectory, then you need to specify that, for instance: "ant -file someSubDirectory/build.xml"
I think this would be a good time for you to read the extensive Ant documentation that comes with the download; look in the "docs" directory. It covers all this.
Thanks.Now i can able to successfully build the file.But i tried to build the file inside eclipse and i right click on the build.xml and clicked run as Ant build file.I found the following error in the eclipse console:
The error message mentions a class that can't be found. Look around in the Ant and Tomcat jar files for that class, and make sure it's in the classpath when you run Ant.
Without knowing what the build file is trying to do at that moment, we can't guess what's going on. But the error message is rather specific - it should allow you to start investigating what's going wrong. What have you found out so far?
i have my java -version running
all the environmental variables are set correctly
ant -version command is also working
but when i enter ant command
c:\>;ant
Buildfile: build.xml does not exist!
Build failed
with this command
C:\>ant -find build.xml
Searching for build.xml ...
Could not locate a build file!
it is asking for a build.xml file
i dont see build.xml file in any of the folders in the unzipped ant-apache-1.8.1 folder
i do not have a build.xml file