{"id":102,"date":"2009-01-13T00:00:00","date_gmt":"2009-01-13T00:00:00","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2009\/01\/13\/what-is-an-apache-ant\/"},"modified":"2017-12-25T16:45:31","modified_gmt":"2017-12-25T16:45:31","slug":"what-is-an-apache-ant","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/what-is-an-apache-ant\/","title":{"rendered":"What is Apache Ant? &#8211; Apache ant Overview"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3950 aligncenter\" src=\"http:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2009\/01\/apache-ant.png\" alt=\"apache-ant\" width=\"600\" height=\"400\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2009\/01\/apache-ant.png 600w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2009\/01\/apache-ant-300x200.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><b>What is an apache ant?<\/b><br \/>\nApache Ant is a <b>Java-based build tool<\/b>. In theory, it is kind of like Make, but without Make&#8217;s wrinkles.<\/p>\n<p><b>Why another build tool when there is already <i>make<\/i>, <i>gnumake<\/i>, <i>nmake<\/i>, <i>jam<\/i>, and others?<\/b><br \/>\nBecause all those <b>tools have limitations<\/b> that Ant&#8217;s original author couldn&#8217;t live with when developing software across multiple platforms.<br \/>\n<b>Make-like<\/b> tools are inherently shell-based &#8212; they evaluate a set of dependencies, and then execute commands not unlike what you would issue in a shell. This means that you can easily extend these tools by using or writing any program for the OS that you are working on. However, this also means that you limit yourself to the OS, or at least the OS type such as UNIX, that you are working on.<br \/>\n<b>Makefiles<\/b> are inherently evil as well. Anybody who has worked on them for any time has run into the dreaded tab problem. &#8220;Is my command not executing because I have a space in front of my tab!!!&#8221; said the original author of Ant way too many times.<br \/>\nTools like <b>Jam<\/b> took care of this to a great degree, but still have yet another format to use and remember.<br \/>\n<b>Ant is different.<\/b> Instead of a model where it is extended with shell-based commands, Ant is extended using Java classes. Instead of writing shell commands, the configuration files are XML-based, calling out a target tree where various tasks get executed. Each task is run by an object that implements a particular Task interface.<br \/>\nGranted, this removes some of the expressive power that is inherent by being able to construct a shell command such as `find . -name foo -exec rm {}`, but it gives you the ability to be cross platform &#8212; to work anywhere and everywhere. And hey, if you really need to execute a shell command, Ant has an task that allows different commands to be executed based on the OS that it is executing on.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is an apache ant? Apache Ant is a Java-based build tool. In theory, it is kind of like Make, but without Make&#8217;s wrinkles. Why another build tool when there&#8230; <\/p>\n","protected":false},"author":1,"featured_media":3950,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[12],"tags":[2883,209,420,683,2881,2880,2879,2882,2876,1127,2877,359,341,670,2878],"class_list":["post-102","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apache-ant","tag-about-apache-ant","tag-ant","tag-apache","tag-apache-ant","tag-apache-ant-guide","tag-apache-ant-introduction","tag-apache-ant-overview","tag-apache-ant-tutorial","tag-build-tool","tag-introduction","tag-java-based-build-tool","tag-overview","tag-tool","tag-what","tag-what-is-apache-ant"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=102"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/102\/revisions"}],"predecessor-version":[{"id":3953,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/102\/revisions\/3953"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/3950"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}