Friday, September 3, 2021

Build & Compile java code on LINUX using ANT;

Download the ant version at:

https://ant.apache.org/bindownload.cgi

https://archive.apache.org/dist/ant/binaries/


command to unzip the file

$ tar -xvzf apache-ant-1.10.5-bin.tar.gz

$ export ANT_HOME=/app/src/apache-ant-1.10.5

$ export PATH=$PATH:$ANT_HOME/bin

check the ant version:

$ant -version

To run build.xml navigate to the directory and run ant command:

Example:

$ cd /app/JavaAppWithBUILDdotXML/
$ ant

Above command would build the java app and complete the code compilations.


Helpful links:https://youtu.be/sDhSkniEa4Y

https://stackoverflow.com/questions/1086449/ant-build-failed-target-build-xml-does-not-exist/1086463



No comments: