You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Aarti Chandnani <Aa...@XUMA.com> on 2001/05/04 01:05:14 UTC

RE: Only the init task executes

look at your default:
its INIT
change it to compile! :-) 

-----Original Message-----
From: J2EE User [mailto:coolxml@hotmail.com]
Sent: Thursday, May 03, 2001 4:08 PM
To: ant-user@jakarta.apache.org
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