Guys,
what is Apache ant ?
Apache Ant is a software tool for automating software build processes. It is similar to Make but is implemented using the Java language, requires the Java platform, and is best suited to building Java projects.
I followed following steps :
Login into the server via SSH :
====
1. wget http://apache.mirrors.tds.net/ant/binaries/apache-ant-1.8.1-bin.tar.gz
2. tar -xzvf apache-ant-1.8.1-bin.tar.gz
3. cd apache-ant-1.8.1
4. cp -arp * /usr/local/ant
5. echo 'export PATH=$PATH:/usr/local/ant/bin'>>/etc/profile
6. echo 'export ANT_HOME=/usr/local/ant'>>/etc/profile
7. export PATH=$PATH:/usr/local/ant/bin
8. export ANT_HOME=/usr/local/ant
====
Now, execute ant -v or ant --version to check the ant.
That's it. try :)
hey
ReplyDelete4. cp -arp * /usr/local/ant isn't working?
Not sure why not
Lance
Could you please let me the error that you got?
ReplyDeleteDid you create the path like: mkdir -p /usr/local/ant
When i do a ant -v
ReplyDeleteI get the following - build.xml does not exist
Apache Ant(TM) version 1.8.2 compiled on December 20 2010
Trying the default build file: build.xml
Buildfile: build.xml does not exist!
Build failed
Ok i got this from the ant site - thx for this tutorial!!
ReplyDeleteYou can check the basic installation with opening a new shell and typing ant. You should get a message like this
Buildfile: build.xml does not exist!
Build failed
So Ant works. This message is there because you need to write an individual buildfile for your project. With a ant -version you should get an output like
Apache Ant version 1.7.1 compiled on June 27 2008
i also get same error.
ReplyDeleteApache Ant(TM) version 1.8.2 compiled on December 20 2010
Trying the default build file: build.xml
Buildfile: build.xml does not exist!
Build failed
how to fix this. please help me
This is not an error the message says that in the current directory does not exist build.xml file, if you like add ANT_HOME to system path you can add to profile file, of this way http://moeandjava.pusku.com/index.php/java/how-to-install-ant-on-linux
ReplyDeletei am a beginner in linux. i want to install apache webserver.. as i did the above steps i got an error like this.
ReplyDeleteroot@iot2000:~# cd apache-ant-1.8.1
root@iot2000:~/apache-ant-1.8.1# cp -arp * /usr/local/ant
cp: target '/usr/local/ant' is not a directory
root@iot2000:~/apache-ant-1.8.1# mkdir -p /usr/local/ant
root@iot2000:~/apache-ant-1.8.1# cp -arp * /usr/local/ant
root@iot2000:~/apache-ant-1.8.1# echo 'export PATH=$PATH:/usr/local/ant/bin'>>/etc/profile
root@iot2000:~/apache-ant-1.8.1# echo 'export ANT_HOME=/usr/local/ant'>>/etc/profile
root@iot2000:~/apache-ant-1.8.1# export PATH=$PATH:/usr/local/ant/bin
root@iot2000:~/apache-ant-1.8.1# export ANT_HOME=/usr/local/ant
root@iot2000:~/apache-ant-1.8.1# ant -v
-sh: ant: command not found
can someone help me to solve this. what is went wrong
can anyone explain what is PATH and ANT_HOME
DeleteApache Ant Interview Questions and Answers
ReplyDelete