You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Andrew Hunt <an...@toolshed.com> on 2001/05/07 21:12:00 UTC

Ant not compiling all it should


Has anyone else seen this?

We're running into a problem where ant does not always
recompile what it should.

For instance, you can run ant and it will claim that
everything is up to date.  Run it again and it will
compile some number of files.

This is on Win NT (foul product that it is), with no
network-mounted drives or other weirdness.

Here is a snippet of build.xml showing the compile target:

      <target name="compile" depends="prepare, idl">
        <!-- Compile the java code from ${src} into ${build} -->
        <javac srcdir="${src}" 
               destdir="${build}" 
               classpath="${java.class.path}:${junit}:${jdbcx}:${guifiles}:${log4j}:${regx}"/>
      </target>


Any pointers would be greatly appreciated,

thanks!

/\ndy


--
Andrew Hunt, The Pragmatic Programmers, LLC.
Innovative Object-Oriented Software Development
web:   http://www.pragmaticprogrammer.com   email: andy@pragmaticprogrammer.com
--
Books by Andrew Hunt and David Thomas:
    "The Pragmatic Programmer" (Addison-Wesley 2000)
    "Programming Ruby" (Addison-Wesley 2001)
--

Re: Ant not compiling all it should

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Run Ant in verbose mode (-v). It should then tell you why it is recompiling
files. The usual problem is that a file's location within the source tree
does not match the class' location in the package namespace.

Conor

----- Original Message -----
From: "Andrew Hunt" <an...@toolshed.com>
To: <an...@jakarta.apache.org>
Sent: Tuesday, May 08, 2001 5:12 AM
Subject: Ant not compiling all it should


>
>
> Has anyone else seen this?
>
> We're running into a problem where ant does not always
> recompile what it should.
>
> For instance, you can run ant and it will claim that
> everything is up to date.  Run it again and it will
> compile some number of files.
>
> This is on Win NT (foul product that it is), with no
> network-mounted drives or other weirdness.
>
> Here is a snippet of build.xml showing the compile target:
>
>       <target name="compile" depends="prepare, idl">
>         <!-- Compile the java code from ${src} into ${build} -->
>         <javac srcdir="${src}"
>                destdir="${build}"
>
classpath="${java.class.path}:${junit}:${jdbcx}:${guifiles}:${log4j}:${regx
}"/>
>       </target>
>
>
> Any pointers would be greatly appreciated,
>
> thanks!
>
> /\ndy
>
>
> --
> Andrew Hunt, The Pragmatic Programmers, LLC.
> Innovative Object-Oriented Software Development
> web:   http://www.pragmaticprogrammer.com   email:
andy@pragmaticprogrammer.com
> --
> Books by Andrew Hunt and David Thomas:
>     "The Pragmatic Programmer" (Addison-Wesley 2000)
>     "Programming Ruby" (Addison-Wesley 2001)
> --
>