The Goal
You can install Apache Ant on Ubuntu Linux using manual installation method.
The Process
My Environment- My $HOME is located in /home/ltme
- I put Ant package in $HOME/archive/a
- I extract the package to $HOME/programs
- My Ant version is 1.7.1
You must have Java Development Kit (JDK) installed first, refer to this article if you not install the JDK yet.
Installation- Download the latest version of Ant from http://ant.apache.org. Saved to some location i.e: I save to $HOME/archive. First we need to extract the package.
$ tar -jxvf ~/archive/a/apache-ant-1.7.1-bin.tar.bz2 -C ~/programs $ cd programs $ ln -s apache-ant-1.7.1 ant - The next step is to add Apache Ant directory to shell environment variables. So we need to edit .bashrc file located in our home directory.
$ gedit ~/.bashrc - Put this at the end of .bashrc file, after editing your file look something like this:
JAVA_HOME=/usr/local/java JAVA_BIN=$JAVA_HOME/bin ANT_HOME=/home/astadev/programs/ant PATH=$PATH:$JAVA_HOME:$JAVA_BIN:$ANT_HOME/bin export PATH - Save the file, and then open new bash session by pressing CTRL-Shift-T. Try to execute ant.
$ ant Buildfile: build.xml does not exist! Build failed - Done.
Error above indicate that ant command is recognized by shell but it did not find build.xml file that needed to compile ant projects. So, it's absolutely normal and the installation was successful.
0 komentar:
Post a Comment