I think you need to change the first line to:
<project name="Junit" default="compile" basedir=".">
(alternatively, invoke by typing 'ant compile')
Andy
> -----Original Message-----
> From: J2EE User [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 03, 2001 4:08 PM
> To: [EMAIL PROTECTED]
> Subject: Only the init task executes
>
>
> Following is a simple build file:
> <project name="Junit" default="init" basedir=".">
>
> <target name="init">
> <tstamp/>
> <property name="sourceDir" value="src"/>
> <property name="outputDir" value="classes"/>
> </target>
>
> <target name="compile" depends="init">
> <echo message="Begining the comilation of the Java source files"/>
> <javac srcdir="${sourceDir}" destdir="${outputDir}">
> <include name="**/*.java"/>
> <classpath>
> <pathelement path="${classpath}"/>
> <fileset dir="c:\junit3.6">
> <include name="**/*.jar"/>
> </fileset>
> </classpath>
> </javac>
> <echo message="Finished the compilation........"/>
>
> </target>
>
> </project>
>
> I have the src and classes directory set up. I have two java
> source files in
> the src directory. When I run ant only the init task
> executes. I get the
> following output
>
> D:\Projects\Junit>ant
> Searching for build.xml ...
> Buildfile: D:\Projects\Junit\build.xml
>
> init:
>
> BUILD SUCCESSFUL
>
> Total time: 0 seconds
>
> The compile task is not executed and I do not see any classes
> in the lib
> directory. I am using ant 1.3, JDK 1.3 on Win NT
> Any help greatly appreciated.
>
> Thanks
> J2EE User
>