ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aarti Chandnani <Aarti.Chandn...@XUMA.com>
Subject RE: Only the init task executes
Date Thu, 03 May 2001 23:05:14 GMT
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

Mime
View raw message