ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "gautam m" <gautamms...@lycos.com>
Subject Setiing classpath in ANT
Date Thu, 01 Jan 2004 11:10:15 GMT
Hi,
   I have just started using ANT

I am using following script:-
<project name="Gautam" default="all" basedir=".">
     <description>
        simple build file
    </description>

  <!-- set global properties for this build -->
  <property name="source" value="."/>
  <property name="build" location="build"/>

  <target name="init" >
    <!-- create a timestamp -->
  <tstamp/>
  <!-- Create Build directory -->
  <mkdir dir="${build}"/>
  </target>

  <target name="compile" depends="init" >
    <!-- Compile the java code from ${source} into ${build} -->
    <javac srcdir="${source}" deprecation="${DEPRECATION}"
      destdir="${build}"
      includes="*.java"
    />
  </target>

  <!-- Run the example -->
<project name="Gautam" default="all" basedir=".">
     <description>
        simple build file
    </description>

  <!-- set global properties for this build -->
  <property name="source" value="."/>
  <property name="build" location="build"/>

  <target name="init" >
    <!-- create a timestamp -->
  <tstamp/>
  <!-- Create Build directory -->
  <mkdir dir="${build}"/>
  </target>

  <target name="compile" depends="init" >
    <!-- Compile the java code from ${source} into ${build} -->
    <javac srcdir="${source}"
      destdir="${build}"
      includes="Hello.java"
    />
  </target>

  <!-- Run the example -->
  <target name="run" depends="compile">
  <java classname="Hello" />
  </target>

  <!-- Delete the files -->
  <target name="clean" description="clean up" >
  <delete dir="${build}" />
  </target>

<target name="all" depends="init,compile,run"/>
</project>

When i execute ,the program gets compiled but it dosen't run. I get message Hello not found...
If i add "build" directory outside i dont get the message.

How do i set classpath in script..

Thanx a lot 

Gautam



____________________________________________________________
Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message