ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@locus.apache.org>
Subject Re: Introductory Article on Ant
Date Sun, 29 Oct 2000 20:49:00 GMT
At 04:51  29/10/00 -0800, Jayakrishnan Nair wrote:
>
>Hi,   I wrote an introductory article on Ant which is available at
>http://varnam.org/articles/ant.html.   The intended audience is the first
>time user of Ant, who wants to get started. So I have provided a very
>minimal example and explained the details and provided furthur references. 
> Any comments on the content, if anything is wrong, if anything more is to
>be added etc. are welcome. Please reply as a personal mail to me.   

One thing you use
<target name="build" depends="init,prepare">
  <javac  srcdir="${Src}/org/varnam" destdir="${Dest}">
    <classpath>
      <pathelement location="d:\Compilers\jre1.2\lib\rt.jar"/>
      <pathelement location="${Src}"/>
    </classpath>
  </javac>
</target>

when it should probably be
<target name="build" depends="init,prepare">
  <javac  srcdir="${Src}" destdir="${Dest}" includes="org/varnam/**" >
    <classpath>
      <pathelement location="d:\Compilers\jre1.2\lib\rt.jar"/>
      <pathelement location="${Src}"/>
    </classpath>
  </javac>
</target>

The first version will recompile the classes all the time while the second
will only recompiule if .java file is newer than .class file ;)

Cheers,

Pete

*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |
*------------------------------------------------------*

Mime
View raw message