Home
handout
Contents
1. ant buildfile project xml use build file project xml ant Dhome dir home just holycow use given value for property home dir The Ant Build Tool Roundup We have seen the very basics of Ant Buildfile anatomy project targets tasks properties Executing ant arguments for options and targets Next steps getting to know the specific core and optional tasks dealing with files directories paths and filters constructing the build file s for your project extending Ant with tasks implemented by you the Ant user manual gives a valuable reference study build files from other projects like those on sourceforge net and jakarta apache org The Ant Build Tool RESOURCES jakarta 1 ant 1 ant 2 ant 3 The Apache Jakarta Project Apache Ant Project Page Apache Ant is a Java based build tool In theory it is kind of like Make but without Makes wrinkles http jakarta apache org ant Norman Chaffee Building with Ant three part article See how to avoid many of the common growing pains of application development by using simple tools like Ant and JUnit and a simple directory structure CowNote great introduction with lots of detail on developing a build file http softwaredev earthweb com java sdjojta article 0 12401 989631 00 html Steve Loughran A beginners guide to Ant A quick introductory tutorial to the Ant build tool It is intended for people starting out with An
2. Table of Contents LESSON The Ant Build TooL eee eee eee e esee eene entente tn sense poses sense ta sesso seas e tastes sotone osans 1 Millz4hep ML RN 2 History Managing the Build 4 4 eerie eese eese eee sensn eissoes stato stone tassa tes assenso esssS 3 Ant welitBl E EI I B 4 First Ant Step 1 Java sources 4 eere ee eee AE E stato sto s eta sesso stans EA 5 First Ant Step 2 Ant build file eerie eee esee e testes esten senten seta sts sns toss tastes tests toss tse ta sens saes 6 First Ant Step 3 Execute Ant eee esee eee esee eese sesos Ess sense ta oesi eos sens sos so setas testes Do soo sees os Eois 7 FROWN UP er s uasecsdatsassesvagsensenasnces 8 RESOURCES c T A EEIE 9 LESSON The Ant Build Tool author Just van den Broecke just justobjects nl organization Just Objects www justobjects nl Slides 1 Subjects 2 History Managing the Build 3 Ant Principles 4 First Ant Step 1 Java sources 5 First Ant Step 2 Ant build file 6 First Ant Step 3 Execute Ant 7 Roundup Labs Resources Subjects History e Quickstart First Ant build nstallation and execution Buildfile anatomy project targets tasks properties e Built in tasks Opti
3. e first default jar basedir lt property name class dir value basedir class gt lt property name dist dir value S basedir dist gt target name compile gt lt mkdir dir class dir gt lt javac srcdir S basedir destdir class dir gt lt target gt target name jar depends compile gt mkdir dir dist dir jar jarfile dist dir first jar basedir S class dir gt lt target gt lt target name clean gt delete dir S class dir gt delete dir dist dir gt target cO 10 01 G O0rP OO i00 1001 C0 H lt project gt project the top level element target a unit to be built through the contained tasks tasks specific units of work to perform javac jar etc property optional properties name value global to entire project file The Ant Build Tool Notice an Ant build file doesn t use a DTD The reason is to provide extensibility for optional user defined tasks First Ant Step 3 Execute Ant Assuming Ant is installed Use the ant bat sh script or directly script ant sh options target directly java Dant home c ant org apache tools ant Main options target When executed without options or target searches for build xml in current dir attempts building default target jar in example Example targets ant compile runs target compile ant clean runs target clean Example options
4. licit dependencies A cross platform makefile is even more complex as the commands to perform various tasks vary from system to system That is why imake came in to being a program which generates the appropriate makefile for a platform by actually trying out the software installed on the system to see what works and what does then generating a platform specific makefile Cross platform development was never fun especially when testing came in to the equation Java changed the whole notion of cross platform software Now you could run a program on many different operating systems and microprocessors But for a long time the actual development process lagged You could stick with make and require everyone to develop on the same platform or use an IDE and require everyone to use the same IDE These were viable options in small team projects but not in the open source world Ant changed the whole notion of cross platform software development The funny thing is this was almost but not entirely by accident Ant Principles Conceptually Ant mimics make Build files specified in XML Makefile equivalent hierarchical structure ideal for target task dependency graph extensible format e General build command ant written in Java make equivalent interprets build file executes build tasks see next Wide range of build tasks Swiss Army Knife basically any task from checking out sources up to testing and deploymen
5. onal tasks Advanced User defined tasks The Ant Build Tool From the Ant user manual Ant is a Java based build tool In theory it is kind of like make without make s wrinkles Why Why another build tool when there is already make gnumake nmake jam and others Because all those tools have limitations that Ant s original author couldn t live with when developing software across multiple platforms Make like tools are inherently shell based they evaluate a set of dependencies then execute commands not unlike what you would issue on 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 Makefiles are inherently evil as well Anybody who has worked on them for any time has run into the dreaded tab problem Is my command not executing because I have a space in front of my tab said the original author of Ant way too many times Tools like Jam took care of this to a great degree but still have yet another format to use and remember Ant is different 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 partic
6. t core compilation javadoc file management jar tar zip optional FTP JUnit rpm user defined plugin like tasks developed by you using Ant Java API The Ant Build Tool Ant is similar to and at the same time different from make While the make model is extended with shell based commands e g cc 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 Granted this removes some of the expressive power that is inherent in being able to construct a shell command such as find name foo exec rm F but it gives you the ability to be cross platform to work anywhere and everywhere And if you really need to execute a shell command Ant has an exec task that allows different commands to be executed based on the OS it is executing on First Ant Step 1 Java sources This represents your application sources A basic Java Application A basic Java class public class FirstApp public class FirstClass public static void main String args public FirstClass FirstClass firstClass new FirstClass firstClass doSomething public void doSomething System out println Hello Ant The Ant Build Tool First Ant Step 2 Ant build file lt xml version 1 0 gt lt project nam
7. t and Java development and aims to provide enough detail to get started http www iseran com Java ant tutorial ant tutorial html Larry Port Larrys Ant Tutorial Ant is a utility using xml that was developed in response to frustration with makefiles In a nutshell you write an xml document build xml which builds your programs and checks for what depends on what This is a get up and running page so for specific answeres and more detailed info please visit http rlab cs nyu edu lport antTutorial html
8. ular Task interface Granted this removes some of the expressive power that is inherent in being able to construct a shell command such as find name foo exec rm F but it gives you the ability to be cross platform to work anywhere and everywhere And hey if you really need to execute a shell command Ant has an exec task that allows different commands to be executed based on the OS it is executing on History Managing the Build e Primary tool make Complex in particular for different OSs platforms Error prone e g spaces e Java introduced cross platform software make not suitable anymore platform dependent open source development required platform independent builds Enter Ant started as build tool for Sun s servlet JSP development Sun s servlet JSP development carried over to Jakarta Tomcat project through Jakarta projects now the defacto build tool in the Java world The Ant Build Tool From the A beginners guide to Ant by Steve Loughran Once upon a time way back when you had to rewrite applications to run on different operating systems and recompile applications to run on different processors the whole tasks of managing the build was such a complex operation that large projects had people working on the task full time Their primary tool was make a powerful tool which could mix inference rules what commands to issue to produce a o object file from a c C source file with exp
Download Pdf Manuals
Related Search
handout handout handout template handouts meaning handout synonym handout examples handout maker handout definition handout design handout at a busy restaurant handout templates free handouts online handout layout handout format handout 1 handout template word handout vorlagen handouts for presentations handout deutsch handout beispiele handout 2 handouts powerpoint handouts for new hires in ca handout adalah handout on the georgia general assembly
Related Contents
CANDY 5 HD User Manual DocuMate 765 Scanner Benutzerhandbuch Briggs & Stratton 441700 Series User's Manual Lithonia Lighting TWP 150S 120 RNP LPI Instructions / Assembly JabloPhone - Jablotron USER MANUAL 8M0057546 - Brunswick Marine in EMEA Center 〔 器具のはずしかた Graco 308666C User's Manual Port de Nice : du vent dans les voiles Copyright © All rights reserved.
Failed to retrieve file