Create a Java project
a) Go to Java Perspective and create a java project
b) Next go to project Java Build Path and add the external jar files
1)ant .jar
2)optional.jar
From (SAP – Home)Dir:/Program Files/SAP/JDT/eclipse/plugins/org.apache.ant_1.5.3
c) Next Create a Build..xml File
<mkdir dir="$"/>
<mkdir dir="$"/>
<mkdir dir="$"/>
<mkdir dir="$"/>
<mkdir dir="$"/>
<echo>Successfully created.....</echo>
</target>
<target name="compile" depends="init" >
<javac srcdir="$" destdir="$"/>
<target name="zip" depends init"
< p dest le="$/manual.zip" basedir="." />
<echo>Successfully created.....</echo>
</target>
<target name="all" depends="init">
<antcall target="clean"/>
<antcall target="init"/>
<antcall target="compile"/>
<antcall target="zip"/>
</target>
<target name="docs" depends="compile" unless="testsFailed">
<javadoc packagenames="com.swamy.*" sourcepath="$" destdir="$"
author="true" version="true" use="true"
windowtitle="MyProject Documentation">
<bottom><![CDATA[Copyright © 2002</div>]]></bottom>
<link href="http://java.sun.com/products/jdk/1.3/docs/api"/>
</javadoc>
</target>
<target name="clean" description="Removes previous build">
<delete verbose="true">
<fileset dir="$"/>
<fileset dir="$"/>
<fileset dir="$"/>
d) Now run the target
right click the Build.xml and press the Run Ant you will get all the targets which is present in the Build.xml file
Now select the required target and run it
Output for the selected target will be created
Conclusion :-
This blog tells about implementation of Jakarta Ant in Web Application Server