1 / 8

< ant >

< ant >. nrg. Open source from Jakarta. Build tools make, gnumake, nmake. Implemented in Java, and O.S. independent Configuration files are XML based. REQUIREMENTS JAXP Parser ( xercers.jar ) JDK 1.2 or higher ANT_PATH.

amora
Download Presentation

< ant >

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. < ant > nrg

  2. Open source from Jakarta. • Build tools make, gnumake, nmake. • Implemented in Java, and O.S. independent • Configuration files are XML based. • REQUIREMENTS JAXP Parser ( xercers.jar ) JDK 1.2 or higher ANT_PATH

  3. Every project using ant has a default build.xml • Inside build.xml -- Each build file contains one project and a default target ex: Compile is a target -- targets contain task elements ex: Tasks for compile, are copy, compile, delete -- tasks have values assigned to attributes

  4. Project: example 3 < Javadoc > tasks targets javadoc 2 < javac > < copy > compile 1 init < makedir >

  5. SAMPLE BUILD FILE <?xml version="1.0"?> <project name="example" default ="javadoc" basedir="."> <property name="name" value="example" /> <property name="source" value="source" /> <property name="build" value="${basedir}/build" /> <property name="docDir" value="doc" /> <target name= "init" > <mkdir dir="${build}" /> <mkdir dir="${source}" /> <mkdir dir="${docDir}" /> </target>

  6. <target name="copy"> <copy todir="${source}"> <fileset dir="${basedir}" includes="*.java"/> </copy> </target> <target name="compile" depends="init,copy" > <javac srcdir="${source}" destdir="${build}" > </javac> </target> <target name="javadoc" depends ="compile"> <javadoc sourcepath="${source}" packagenames="Adder.*" destdir="${docDir}" /> </target> </project>

  7. Output indicates the tasks that are executed like init, copy, compile • Can build your own tasks org.apache.tools.ant.Task • Gui version of ant is still under development

  8. < end >

More Related