Skip to Content

Create a Java project

a) Go to Java Perspective and create a java project

image

image

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

image

image

c) Next Create a Build..xml File

image

image

         <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

image

Now select the required target and run it

image

image

Output for the selected target will be created

image

Conclusion :-

This blog tells about implementation of  Jakarta Ant in Web Application Server

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply