SlideShare a Scribd company logo
An Introduction to Ant Bryan G. Hutchinson preEmptive Solutions, Inc.
An Introduction to Ant What is Ant? How do you use it? Why would you want to?
What is Ant? “crawling insect living in colonies: an insect that lives in complex well-organized colonies and is noted for …” Encarta World English Dictionary
What is Ant? According to Ant’s web site, ant is “ Apache Ant is a Java-based build tool. In theory, it is kind of like Make, but without Make's wrinkles.”   I’ve called Ant  “Make on Steroids!”
Make Limitations Shell-based: tied to a particular OS Makefile issues: tab vs. space
Ant Advantages Platform independent - thanks to Java! XML config files Tasks run by object implementing Task Interface
How to use Ant Install Ant Get It from the Ant home page Install It (Optional) Build It Check Library Dependancies and Platform-dependant issues
How to Use Ant Configured using an XML buildfile Buildfile contains one  project  and at least one  target Targets  contain  Tasks
Ant Buildfile Projects  have three attributes Optional name - name of project Required default - task to perform Optional basedir - base directory used for path calculation <project name=”JavaSig&quot; default=&quot;deploy&quot; basedir=&quot;.&quot;>
Ant Buildfile A  project  defines one or more  targets A  target  is a set of  tasks  to execute The default target is executed unless a target is specified when executing Ant
Ant Buildfile - Target <target name=&quot;deploy&quot; depends=&quot;dist&quot;> <!-- Copy jars to the weblogic instance --> <copy preservelastmodified=&quot;yes&quot;    todir=&quot;${deploy_dir}&quot;> <fileset dir=&quot;${dist}&quot;> <include name=&quot;*.jar&quot;/> <exclude name=”TestClients.jar&quot;/> </fileset> </copy> </target>
Ant Buildfile - Targets Can depend on other targets Gets executed only once Can determine execution based on a property
Ant Buildfile - Tasks Code that can be executed Can have multiple attributes Ant includes built-in tasks and optional tasks Can write your own tasks in Java  <javac srcdir=&quot;${src}&quot; destdir=&quot;${build}&quot;> <classpath refid=”compile.class.path&quot;/> </javac>
Ant Buildfile - Properties Properties can be set for a project Setup using the <property> task Setup in an external properties file Case-sensitive name / value Can be reference in task attributes using “${ propertyName }” System properties and Ant built-in properties available
Ant Buildfile - Properties <!-- set global properties for this build --> <property name=&quot;src&quot; value=&quot;src&quot;/> <property name=&quot;build&quot; value=&quot;build&quot;/> <property name=&quot;dist&quot; value=&quot;dist&quot;/> <property name=&quot;lib&quot; value=&quot;lib&quot;/> <property name=&quot;archive&quot; value=&quot;archive&quot;/> <property name=&quot;weblogic.home&quot; value=&quot;c:\weblogic&quot;/> <property name=&quot;wl_lib&quot; value=&quot;${weblogic.home}/myserver/lib&quot;/>
Ant Buildfile - PatternSets Patterns can be grouped in sets and referenced by id Defined by <patternset> element nested in a FileSet directory-based task stand alone element at target level
Ant Buildfile - PatternSets <patternset> has the following attributes: includes: list of patterns/files to include includesfile: name of file listing includes excludes: list of patterns/files to exclude excludesfile: name of file listing excludes Can also use nested <include> and <exclude> elements to specify patterns
Ant Buildfile - FileSets Groups of files Used by many tasks Files are found in a directory tree starting in a base directory and matching any number of PatternSets Can use nested <patternset> elements Also holds an implicit PatternSet
Ant Buildfile - FileSets <fileset dir=&quot;${build}&quot; includesfile=&quot;browseQueues.txt&quot;/> <fileset dir=&quot;${lib}/resources&quot; includes=&quot;**/BrowseQueues.properties&quot;/> <fileset dir=&quot;${dist}&quot;> <include name=&quot;*.jar&quot;/> <exclude name=&quot;GrinderTests.jar&quot;/> <exclude name=&quot;SystemTest.jar&quot;/> <exclude name=&quot;BrowseQueues.jar&quot;/> </fileset>
Why Use Ant? Ease of Use/Configuration Extensibility Standardized Platform Independent It’s Java It’s Open Source
Ant Resources Ant home page http://jakarta.apache.org/ant/index.html Ant User Manual http://jakarta.apache.org/ant/manual/index.html Ant Resources http://jakarta.apache.org/ant/resources.html “ Ant in Anger” http://jakarta.apache.org/ant/ant_in_anger.html

More Related Content

PPT
Hack in the Box Keynote 2006
Mark Curphey
 
PPTX
Php on the desktop and php gtk2
Elizabeth Smith
 
PDF
Php go vrooom!
Elizabeth Smith
 
PDF
SPL to the Rescue - Tek 09
Elizabeth Smith
 
PPTX
Zephir - A Wind of Change for writing PHP extensions
Mark Baker
 
PPTX
Let's write secure Drupal code! DUG Belgium - 08/08/2019
Balázs Tatár
 
PPTX
New in php 7
Vic Metcalfe
 
PPTX
Php on the Web and Desktop
Elizabeth Smith
 
Hack in the Box Keynote 2006
Mark Curphey
 
Php on the desktop and php gtk2
Elizabeth Smith
 
Php go vrooom!
Elizabeth Smith
 
SPL to the Rescue - Tek 09
Elizabeth Smith
 
Zephir - A Wind of Change for writing PHP extensions
Mark Baker
 
Let's write secure Drupal code! DUG Belgium - 08/08/2019
Balázs Tatár
 
New in php 7
Vic Metcalfe
 
Php on the Web and Desktop
Elizabeth Smith
 

What's hot (20)

ODP
Symfony CMF - PHP Conference Brazil 2011
Jacopo Romei
 
PPTX
Let's write secure drupal code! - Drupal Camp Pannonia 2019
Balázs Tatár
 
PPTX
Php string function
Ravi Bhadauria
 
PPTX
PHP FUNCTIONS
Zeeshan Ahmed
 
PPT
PHP - Introduction to PHP Functions
Vibrant Technologies & Computers
 
PDF
Introduction To Django (Strange Loop 2011)
Jacob Kaplan-Moss
 
PDF
PECL Picks - Extensions to make your life better
ZendCon
 
PDF
Django REST Framework
Load Impact
 
PDF
New Features in PHP 5.3
Bradley Holt
 
PPTX
Php 7 hhvm and co
Pierre Joye
 
PPT
Create a web-app with Cgi Appplication
olegmmiller
 
PDF
Django - 次の一歩 gumiStudy#3
makoto tsuyuki
 
PPTX
RESTful API 제대로 만들기
Juwon Kim
 
PPTX
Let's write secure Drupal code! - Drupal Camp Poland 2019
Balázs Tatár
 
KEY
PHP security audits
Damien Seguy
 
PDF
Demystifying Object-Oriented Programming - ZendCon 2016
Alena Holligan
 
PPTX
Let's write secure Drupal code! - DrupalCamp Oslo, 2018
Balázs Tatár
 
PDF
Web Scraping with PHP
Matthew Turland
 
ODP
Zend Framework 1.9 Setup & Using Zend_Tool
Gordon Forsythe
 
Symfony CMF - PHP Conference Brazil 2011
Jacopo Romei
 
Let's write secure drupal code! - Drupal Camp Pannonia 2019
Balázs Tatár
 
Php string function
Ravi Bhadauria
 
PHP FUNCTIONS
Zeeshan Ahmed
 
PHP - Introduction to PHP Functions
Vibrant Technologies & Computers
 
Introduction To Django (Strange Loop 2011)
Jacob Kaplan-Moss
 
PECL Picks - Extensions to make your life better
ZendCon
 
Django REST Framework
Load Impact
 
New Features in PHP 5.3
Bradley Holt
 
Php 7 hhvm and co
Pierre Joye
 
Create a web-app with Cgi Appplication
olegmmiller
 
Django - 次の一歩 gumiStudy#3
makoto tsuyuki
 
RESTful API 제대로 만들기
Juwon Kim
 
Let's write secure Drupal code! - Drupal Camp Poland 2019
Balázs Tatár
 
PHP security audits
Damien Seguy
 
Demystifying Object-Oriented Programming - ZendCon 2016
Alena Holligan
 
Let's write secure Drupal code! - DrupalCamp Oslo, 2018
Balázs Tatár
 
Web Scraping with PHP
Matthew Turland
 
Zend Framework 1.9 Setup & Using Zend_Tool
Gordon Forsythe
 
Ad

Viewers also liked (20)

PPTX
Los Derechos de Autor en España
guest7e6ec253
 
PPS
Derecho de Autor en España
vicosamp
 
PPT
Propiedad intelectual y derechos de autor - Algunas ideas
Diego Leal
 
ODP
Rocio mascota
sextoBLucena
 
ODP
Rabat
alumnado5y6b
 
ODP
Roberto
alumnado5y6b
 
PDF
Mesura i control de la humitat en biocombustibles forestals
AFIB CTFC
 
ODP
Composition
alumnado5y6b
 
PPTX
Dog
rocblanc2013
 
PPTX
Mi mascota tobby
emili rodriguez florez
 
ODP
Mi mascota por Andrea
sextoBLucena
 
PDF
composurefordogs
Herry Parsad
 
PPTX
Mi mascota por María G,
sextoBLucena
 
PPTX
Minecraft
rocblanc2013
 
PPT
Mc Curdy Austin D
woisdmccurdy4
 
PPT
Dogs
9cvargas
 
ODP
Juanito My Dog
alumnado5y6b
 
PPTX
Mi mascota
jose gutierrez
 
PPTX
psicologiacanina.rd
Santiago Puig Hermida
 
ODP
Presentación de mi mascota María V.
sextoBLucena
 
Los Derechos de Autor en España
guest7e6ec253
 
Derecho de Autor en España
vicosamp
 
Propiedad intelectual y derechos de autor - Algunas ideas
Diego Leal
 
Rocio mascota
sextoBLucena
 
Roberto
alumnado5y6b
 
Mesura i control de la humitat en biocombustibles forestals
AFIB CTFC
 
Composition
alumnado5y6b
 
Mi mascota tobby
emili rodriguez florez
 
Mi mascota por Andrea
sextoBLucena
 
composurefordogs
Herry Parsad
 
Mi mascota por María G,
sextoBLucena
 
Minecraft
rocblanc2013
 
Mc Curdy Austin D
woisdmccurdy4
 
Dogs
9cvargas
 
Juanito My Dog
alumnado5y6b
 
Mi mascota
jose gutierrez
 
psicologiacanina.rd
Santiago Puig Hermida
 
Presentación de mi mascota María V.
sextoBLucena
 
Ad

Similar to Ant (20)

PPT
Introduction To Ant
Rajesh Kumar
 
PDF
Deploy Flex with Apache Ant
dctrl — studio for creativ technology
 
PPT
Ant - Another Neat Tool
Kanika2885
 
PPT
Ant - Another Neat Tool
Kanika2885
 
ODP
Ant User Guide
Muthuselvam RS
 
PPT
Using Ant To Build J2 Ee Applications
Rajesh Kumar
 
PPT
Apache ant
K. M. Fazle Azim Babu
 
PPT
Apache Ant
hussulinux
 
PPT
Introduction To Ant1
Rajesh Kumar
 
PPT
Apache Ant
Rajesh Kumar
 
PDF
Ant_quick_guide
ducquoc_vn
 
PPTX
Apache ant
koniik
 
PPT
Intro to-ant
Manav Prasad
 
PPT
Ant
Manav Prasad
 
PPTX
Apache ant
Yuriy Galavay
 
PDF
Java Builds with Maven and Ant
David Noble
 
PDF
Build Scripts
Ólafur Andri Ragnarsson
 
PDF
Introduction to Apache Ant
Shih-Hsiang Lin
 
PDF
Ant tutorial
Ratnesh Kumar Singh
 
Introduction To Ant
Rajesh Kumar
 
Deploy Flex with Apache Ant
dctrl — studio for creativ technology
 
Ant - Another Neat Tool
Kanika2885
 
Ant - Another Neat Tool
Kanika2885
 
Ant User Guide
Muthuselvam RS
 
Using Ant To Build J2 Ee Applications
Rajesh Kumar
 
Apache Ant
hussulinux
 
Introduction To Ant1
Rajesh Kumar
 
Apache Ant
Rajesh Kumar
 
Ant_quick_guide
ducquoc_vn
 
Apache ant
koniik
 
Intro to-ant
Manav Prasad
 
Apache ant
Yuriy Galavay
 
Java Builds with Maven and Ant
David Noble
 
Introduction to Apache Ant
Shih-Hsiang Lin
 
Ant tutorial
Ratnesh Kumar Singh
 

Recently uploaded (20)

PPTX
Final PPT on DAJGUA, EV Charging, Meter Devoloution, CGRF, Annual Accounts & ...
directord
 
PDF
Infrastructure and geopolitics.AM.ENG.docx.pdf
Andrea Mennillo
 
PDF
12 Oil and Gas Companies in India Driving the Energy Sector.pdf
Essar Group
 
PDF
Gregory Felber - An Accomplished Underwater Marine Biologist
Gregory Felber
 
PDF
Retinal Disorder Treatment Market 2030: The Impact of Advanced Diagnostics an...
Kumar Satyam
 
PPTX
Struggling to Land a Social Media Marketing Job Here’s How to Navigate the In...
RahulSharma280537
 
PDF
Tariff Surcharge and Price Increase Decision
Joshua Gao
 
PDF
Equinox Gold - Corporate Presentation.pdf
Equinox Gold Corp.
 
PDF
William Trowell - A Construction Project Manager
William Trowell
 
PDF
Alan Stalcup - Principal Of GVA Real Estate Investments
Alan Stalcup
 
PPTX
Certificate of Incorporation, Prospectus, Certificate of Commencement of Busi...
Keerthana Chinnathambi
 
PDF
NewBase 26 July 2025 Energy News issue - 1806 by Khaled Al Awadi_compressed.pdf
Khaled Al Awadi
 
PPTX
Virbyze_Our company profile_Preview.pptx
myckwabs
 
PDF
India Cold Chain Storage And Logistics Market: From Farm Gate to Consumer – T...
Kumar Satyam
 
PPTX
Appreciations - July 25.pptxffsdjjjjjjjjjjjj
anushavnayak
 
PDF
Keppel Ltd. 1H 2025 Results Presentation Slides
KeppelCorporation
 
PPTX
Social Media Marketing for Business Growth
vidhi622006
 
PPTX
E-Way Bill under GST – Transport & Logistics.pptx
Keerthana Chinnathambi
 
PDF
askOdin - An Introduction to AI-Powered Investment Judgment
YekSoon LOK
 
PPTX
The Ultimate Guide to Customer Journey Mapping
RUPAL AGARWAL
 
Final PPT on DAJGUA, EV Charging, Meter Devoloution, CGRF, Annual Accounts & ...
directord
 
Infrastructure and geopolitics.AM.ENG.docx.pdf
Andrea Mennillo
 
12 Oil and Gas Companies in India Driving the Energy Sector.pdf
Essar Group
 
Gregory Felber - An Accomplished Underwater Marine Biologist
Gregory Felber
 
Retinal Disorder Treatment Market 2030: The Impact of Advanced Diagnostics an...
Kumar Satyam
 
Struggling to Land a Social Media Marketing Job Here’s How to Navigate the In...
RahulSharma280537
 
Tariff Surcharge and Price Increase Decision
Joshua Gao
 
Equinox Gold - Corporate Presentation.pdf
Equinox Gold Corp.
 
William Trowell - A Construction Project Manager
William Trowell
 
Alan Stalcup - Principal Of GVA Real Estate Investments
Alan Stalcup
 
Certificate of Incorporation, Prospectus, Certificate of Commencement of Busi...
Keerthana Chinnathambi
 
NewBase 26 July 2025 Energy News issue - 1806 by Khaled Al Awadi_compressed.pdf
Khaled Al Awadi
 
Virbyze_Our company profile_Preview.pptx
myckwabs
 
India Cold Chain Storage And Logistics Market: From Farm Gate to Consumer – T...
Kumar Satyam
 
Appreciations - July 25.pptxffsdjjjjjjjjjjjj
anushavnayak
 
Keppel Ltd. 1H 2025 Results Presentation Slides
KeppelCorporation
 
Social Media Marketing for Business Growth
vidhi622006
 
E-Way Bill under GST – Transport & Logistics.pptx
Keerthana Chinnathambi
 
askOdin - An Introduction to AI-Powered Investment Judgment
YekSoon LOK
 
The Ultimate Guide to Customer Journey Mapping
RUPAL AGARWAL
 

Ant

  • 1. An Introduction to Ant Bryan G. Hutchinson preEmptive Solutions, Inc.
  • 2. An Introduction to Ant What is Ant? How do you use it? Why would you want to?
  • 3. What is Ant? “crawling insect living in colonies: an insect that lives in complex well-organized colonies and is noted for …” Encarta World English Dictionary
  • 4. What is Ant? According to Ant’s web site, ant is “ Apache Ant is a Java-based build tool. In theory, it is kind of like Make, but without Make's wrinkles.” I’ve called Ant “Make on Steroids!”
  • 5. Make Limitations Shell-based: tied to a particular OS Makefile issues: tab vs. space
  • 6. Ant Advantages Platform independent - thanks to Java! XML config files Tasks run by object implementing Task Interface
  • 7. How to use Ant Install Ant Get It from the Ant home page Install It (Optional) Build It Check Library Dependancies and Platform-dependant issues
  • 8. How to Use Ant Configured using an XML buildfile Buildfile contains one project and at least one target Targets contain Tasks
  • 9. Ant Buildfile Projects have three attributes Optional name - name of project Required default - task to perform Optional basedir - base directory used for path calculation <project name=”JavaSig&quot; default=&quot;deploy&quot; basedir=&quot;.&quot;>
  • 10. Ant Buildfile A project defines one or more targets A target is a set of tasks to execute The default target is executed unless a target is specified when executing Ant
  • 11. Ant Buildfile - Target <target name=&quot;deploy&quot; depends=&quot;dist&quot;> <!-- Copy jars to the weblogic instance --> <copy preservelastmodified=&quot;yes&quot; todir=&quot;${deploy_dir}&quot;> <fileset dir=&quot;${dist}&quot;> <include name=&quot;*.jar&quot;/> <exclude name=”TestClients.jar&quot;/> </fileset> </copy> </target>
  • 12. Ant Buildfile - Targets Can depend on other targets Gets executed only once Can determine execution based on a property
  • 13. Ant Buildfile - Tasks Code that can be executed Can have multiple attributes Ant includes built-in tasks and optional tasks Can write your own tasks in Java <javac srcdir=&quot;${src}&quot; destdir=&quot;${build}&quot;> <classpath refid=”compile.class.path&quot;/> </javac>
  • 14. Ant Buildfile - Properties Properties can be set for a project Setup using the <property> task Setup in an external properties file Case-sensitive name / value Can be reference in task attributes using “${ propertyName }” System properties and Ant built-in properties available
  • 15. Ant Buildfile - Properties <!-- set global properties for this build --> <property name=&quot;src&quot; value=&quot;src&quot;/> <property name=&quot;build&quot; value=&quot;build&quot;/> <property name=&quot;dist&quot; value=&quot;dist&quot;/> <property name=&quot;lib&quot; value=&quot;lib&quot;/> <property name=&quot;archive&quot; value=&quot;archive&quot;/> <property name=&quot;weblogic.home&quot; value=&quot;c:\weblogic&quot;/> <property name=&quot;wl_lib&quot; value=&quot;${weblogic.home}/myserver/lib&quot;/>
  • 16. Ant Buildfile - PatternSets Patterns can be grouped in sets and referenced by id Defined by <patternset> element nested in a FileSet directory-based task stand alone element at target level
  • 17. Ant Buildfile - PatternSets <patternset> has the following attributes: includes: list of patterns/files to include includesfile: name of file listing includes excludes: list of patterns/files to exclude excludesfile: name of file listing excludes Can also use nested <include> and <exclude> elements to specify patterns
  • 18. Ant Buildfile - FileSets Groups of files Used by many tasks Files are found in a directory tree starting in a base directory and matching any number of PatternSets Can use nested <patternset> elements Also holds an implicit PatternSet
  • 19. Ant Buildfile - FileSets <fileset dir=&quot;${build}&quot; includesfile=&quot;browseQueues.txt&quot;/> <fileset dir=&quot;${lib}/resources&quot; includes=&quot;**/BrowseQueues.properties&quot;/> <fileset dir=&quot;${dist}&quot;> <include name=&quot;*.jar&quot;/> <exclude name=&quot;GrinderTests.jar&quot;/> <exclude name=&quot;SystemTest.jar&quot;/> <exclude name=&quot;BrowseQueues.jar&quot;/> </fileset>
  • 20. Why Use Ant? Ease of Use/Configuration Extensibility Standardized Platform Independent It’s Java It’s Open Source
  • 21. Ant Resources Ant home page http://jakarta.apache.org/ant/index.html Ant User Manual http://jakarta.apache.org/ant/manual/index.html Ant Resources http://jakarta.apache.org/ant/resources.html “ Ant in Anger” http://jakarta.apache.org/ant/ant_in_anger.html