Live and Learn – ant. Resources  Ant User Manual  Skip the book, most of the material is right here  Apache.

Slides:



Advertisements
Similar presentations
Developing in CAS. Why? As distributed you edit CAS 3 with Eclipse and build with Maven 2 – Best Practice for Release Engineering – Difficult edit-debug.
Advertisements

Software Development Tools COMP220/COMP285 Seb Coope Ant and XML: Getting Started These slides are mainly based on “Java Development with Ant” - E. Hatcher.
ANT: Another Nice Tool Ali Beyad October 1, 2003.
ANT – Another Neat Tool Representation and Management of Data on the Internet.
ANT: Another Nice Tool Ali Beyad October 1, 2003.
MC365 Ant. Today We Will Cover: Overview of Ant Installing Ant Using the Ant command line tool Various Ant commands available Using Ant in Eclipse.
Fall 2007CS 2251 Programming Tools Eclipse JUnit Testing make and ant.
CS Lecture 03 Outline Sed and awk from previous lecture Writing simple bash script Assignment 1 discussion 1CS 311 Operating SystemsLecture 03.
1 Ant – Another Neat Tool Representation and Management of Data on the Internet.
© S Ramakrishnan1 Systems V & V, Quality and Standards Dr Sita Ramakrishnan School CSSE Monash University.
CSC 395 – Software Engineering Lecture 24: Apache Ant –or– Programming the results of programming Based upon a talk by Anthony Wat.
Winter 2005Jason Prideaux1 Apache ANT A platform independent build tool for Java programs.
Introduction to Ant David Rabinowitz. March 3rd, 2004 Object Oriented Design Course 2 Ant Yet another build tool? Why do we need one where there are make,
Introduction to Ant- a framework example Amit Shabtay.
SERVLETS.
Automating the Build Process using ANT SE-2030 Dr. Mark L. Hornick 1.
Using Ant to build J2EE Applications Kumar
Intro-Sound-part21 Introduction to Processing Digital Sounds part 2 Barb Ericson Georgia Institute of Technology Oct 2009.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Introduction to ant Guy Rixon AstroGrid Consortium Meeting
Using Opal to deploy a real scientific application as a Web service Sriram Krishnan
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
JUnit in Action SECOND EDITION PETAR TAHCHIEV FELIPE LEME VINCENT MASSOL GARY GREGORY ©2011 by Manning Publications Co. All rights reserved. Slides Prepared.
Apache Ant Java-Based Build Tool. Making your builds boring… Building projects should be easy and standardized. You should not be spending a substantial.
AN OVERVIEW OF SERVLET TECHNOLOGY SERVER SETUP AND CONFIGURATION WEB APPLICATION STRUCTURE BASIC SERVLET EXAMPLE Java Servlets - Compiled By Nitin Pai.
Guidelines for Homework 6. Getting Started Homework 6 requires that you complete Homework 5. –All of HW5 must run on the GridFarm. –HW6 may run elsewhere.
Configuration Management (CM)* Source code control Versioning Build Management *Some of this material adapted from Ian Sommerville’s course notes, Ch.
Ant Build Tools.  Creating a product from source may take several steps: Compile Link Copy files to various directories Remove intermediate files Generate.
TOOLS FOR DESIGN AND DEVELOPMENT ENVIRONMENTS. Case study - ECLIPSE Lecture notes 7.
July 2011CMSC 341 CVS/Ant 1 CMSC 341 Java Packages Ant CVS Project Submission.
Ant Presentation by: Bart Taylor. What is Ant? The simple definition: A Java-based build tool The Official Definition: “Apache Ant is a Java-based build.
Sed, awk, & perl CS 2204 Class meeting 13 *Notes by Mir Farooq Ali and other members of the CS faculty at Virginia Tech. Copyright 2003.
Ant & Jar Ant – Java-based build tool Jar – pkzip archive, that contains metadata (a manifest file) that the JRE understands.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
CODELABOR Shin Sang Jae Template Guide (codelabor-flex-lcds-template)
Week 2-3 Control flow (review) Conditional statements If, else, else if, switch-case, break Loop constructs for, while, do-while, break, continue, label--go;
Testing and Build JUnit and Ant. JUnit Testing is not closely integrated with development. This prevents you from measuring the progress of development-
Distributed Java Programming Build Management  A repeatable build management process allows you to integrate the development efforts of your team.
Chapter 3 Understanding Ant datatypes and properties.
Software Development COMP220/COMP285 Seb Coope Introducing Ant These slides are mainly based on “Java Development with Ant” - E. Hatcher & S.Loughran.
Perl Tutorial. Why PERL ??? Practical extraction and report language Similar to shell script but lot easier and more powerful Easy availablity All details.
Installing SPHINX by: COLLEGE OF ART & SCIENCE UNIVERSITI UTARA MALAYSIA STIW5023 ADVANCED PROGRAMMING.
Chapter Twelve sed, awk & perl1 System Programming sed, awk & perl.
JUnit A framework which provides hooks for easy testing of your Java code, as it's built Note: The examples from these slides can be found in ~kschmidt/public_html/CS265/Labs/Java/Junit.
Chapter 1 Introducing Ant. What is ant? Ant is a build tool  Automate the tasks of compiling code, running test, and packaging the results for redistribution.
Serialization Allows you to turn Java Objects into serial data that can be either save to a file or sent over a network. Usefull for persisting data.
Ant / continuous integration. Turning Client Vision into Results 2 Outline presentation Introduction Ant –History –Concepts –Tasks –Examples –Extending.
Loader Tutorial Set Up. Requirements Java 7 Eclipse IvyIDE plugin Git Optional: Ant Maven.
Aquarium Lab Series Developed by Alyce BradyAlyce Brady of Kalamazoo CollegeKalamazoo College.
® IBM Software Group © 2006 IBM Corporation Rational Asset Manager v7.2 Using Scripting Tutorial for using command line and scripting using Ant Tasks Carlos.
Brandon Packard. Why make? So far, you have probably worked on relatively small projects Coding projects can become huge My research consists of 1600.
Quiz 3 Topics Functions – using and writing. Lists: –operators used with lists. –keywords used with lists. –BIF’s used with lists. –list methods. Loops.
Using Ant in Eclipse Dwight Deugo Nesa Matic
Software Development Tools COMP220 Seb Coope Ant: Datatypes and Properties These slides are mainly based on “Java Development with Ant” - E. Hatcher &
Software Development Tools COMP220 Seb Coope More Ant Features These slides are mainly based on “Java Development with Ant” - E. Hatcher & S.Loughran.
SG Introduction to ANT scmGalaxy Author: Rajesh Kumar
Software Development Tools COMP220 Seb Coope Ant: Datatypes and Properties These slides are mainly based on “Java Development with Ant” - E. Hatcher &
An Introduction to Ant. What is Ant? How do you use it? Why would you want to?
Software Development Tools
Software Development Tools
NAnt Build Tool CSE784 : ProjectCentralNet Prof : Dr. Jim Fawcett
Introduction to Ant scmGalaxy Author: Rajesh Kumar
Download TPL.zip to some directory
Developing the Tools Montreal 2004
J2EE Application Development
Ant.
JavaTeaching and Importing a github repository
Nilanjan Banerjee Java Packages Ant CVS Project Submission
Classes 5/5 May 14, 2019 ICS102: Classes 5/5.
SPL – PS1 Introduction to C++.
Presentation transcript:

Live and Learn – ant

Resources  Ant User Manual  Skip the book, most of the material is right here  Apache Ant 101 – DeveloperWorks ibm.com/developerworks/edu/j-dw-java- apant-i.html ibm.com/developerworks/edu/j-dw-java- apant-i.html  Totally righteous tutorial

Questions from Live and Learn 1.What is the basic structure of an Ant file? 2.What's required and what's optional? 3.What is the difference between build.xml and build.properties? 4.What is the advantages/disadvantages of defining properties in build.properties instead of build.xml? 5.How do I create and destroy directories? 6.How do I define projects to run using Ant? 7.Other hints and suggestions from an expert? 8.How to do junit tasks? 9.How to do task dependencies (don't compile unless fetch got stuff)

Basic structure  Entities: Project Targets Tasks Types  Project contains tasks, which contain targets and types  Implicit target contains all “top-level” targets and types is executed each time ant is invoked, even for -projecthelp

Minimal file

Sample file (unreadable) A simple Java project

Sample file (part 1) A simple Java project

Sample file (part 2) <jar destfile="${distDir}/package-${DSTAMP}.jar" basedir="${buildDir}"> <jar destfile="${distDir}/package-src-${DSTAMP}.jar“ basedir="${srcDir}"/>

Properties  Write-once!  From command line: ant -D key=value  Built-in: basedir, ant.file, ant.version, ant.project.name, ant.java.version  Java System properties /System.html#getProperties() /System.html#getProperties()  From the Property task

Property task  explicitly stated:  pulled from a file: Java-style properties file syntax.  pulled from the environment:  also URL or Resource

Example from ExpertVoices <fail unless="env.EV_CONFIG" message="Environment variable 'EV_CONFIG' is not set"/> <property name="config_property_file“ location="properties/${env.EV_CONFIG}.build.properties"/> <available file="${config_property_file}" type="file“ property="config_property_file_present"/> <fail unless="config_property_file_present“ message="Property file '${config_property_file}' missing"/> <property name="common_property_file“ location="properties/_common.build.properties"/>

File Set  Inline:  By reference:

Pattern Set  Inline or by reference

Path-like structures -simple

Path-like structures - complex

Other types  Selectors Selectors are a mechanism whereby the files that make up a fileset can be selected based on criteria other than filename.  Filtersets <copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt">

Optional tasks  Require libraries that are not supplied with Ant Put them in Ant’s lib directory, or add to the system classpath

Optional tasks - gotchas  from  Note: You must have junit.jar and the class files for the task in the same classpath. You can do one of: Put both junit.jar and the optional tasks jar file in ANT_HOME/lib. Do not put either in ANT_HOME/lib, and instead include their locations in your CLASSPATH environment variable. Do neither of the above, and instead, specify their locations using a element in the build file. See the FAQ for details.the FAQ

If – Then – Else THEN BODY EXECUTED ELSE BODY EXECUTED

“Subroutines” with parameters <param name="extensions_dir" value="${third_party_themes_dir}"/> <param name="destination_dir“ value="${build_wpmu_themes_dir}"/>

Loops <foreach target="unzip_extension" param="zip_file" inheritall="Yes">