ant not creating jar file

i'm really stuck into it.

i've done everything but of no use.

My problem is that i created a simplebuild.xml file and tried to make it through theAnt tool.

It is creating and deleting directories, compiling the files successfully but not creating the jar file. also it is not running the program.

Here is my class and here is mybuild.xml file.

i've put all files in directory :c:\usingant

<project default="compile">

<property name="src" location="src"/>

<property name="jar" location="jar"/>

<property name="classes" location="classes"/>

<property name="build" location="."/>

<target name="init">

<delete dir="${jar}"/>

<delete dir="${classes}"/>

<mkdir dir="${jar}" />

<mkdir dir="${classes}" />

</target>

<target name="compile" depends="init">

<javac srcdir="${src}" destdir="${classes}" />

</target>

<target name="run" depends="compile">

<java classname="AntTest" classpath="${classes}" fork="true"/>

</target>

</project>

the java file is placed in the src directory

public class AntTest{

public static void main( String ar[] ){

System.out.println("This program is testing Ant");

}

}

Please help me what's wrong

thanking you in advance

[1470 byte] By [Ashutosh.options4ua] at [2007-11-27 6:33:01]
# 1
Which IDE you are using?Many IDEs like eclipse and netbeans can create jar files by themselves.-AchyuthMessage was edited by: achyuthbMessage was edited by: achyuthb
achyuthba at 2007-7-12 17:58:47 > top of Java-index,Java Essentials,Java Programming...
# 2

Ant do magic, but you must tell it to do it.

You are missing the "tasks" for doing the jar and running it.

<target name="compile" depends="init">

<javac srcdir="${src}" destdir="${classes}" />

<jar destfile="${jar}/app.jar" basedir="${classes}" />

<java classname="AntTest">

<classpath location="jar/app.jar"/>

</java>

</target>

oropezaa at 2007-7-12 17:58:47 > top of Java-index,Java Essentials,Java Programming...
# 3
here is my build if you wish: http://petitcalvino.free.fr/build.xml
calvino_inda at 2007-7-12 17:58:47 > top of Java-index,Java Essentials,Java Programming...
# 4
such a silly mistake i've done.a lot of thanks to you buddy, it really helped me a lotthanx once again
Ashutosh.options4ua at 2007-7-12 17:58:47 > top of Java-index,Java Essentials,Java Programming...