You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Suu Quan <sq...@wwc.com> on 2001/05/21 23:30:30 UTC
Why does recompile even source not modified?
In my attempt to understand javac, I have set a task to compile a few java
files
in a package util.* (project name is 'stp')
<target name='utils'>
<javac srcdir="/stp/utils" destdir='/stp'
includes='*.java' verbose='yes'
excludes='Copy.java'
/>
</target>
The first compile went OK. The subsequent times I ran ant again, it does
recompile
all the class files.
Note that each java file has the declaration 'package utils;' in them.
Sample output for one file
[javac] [checking utils.MediatedThreadIf]
[javac] [wrote C:\stp\utils\MediatedThreadIf.class]
What did I do wrong
Thanks in advance
Re: Why does recompile even source not modified?
Posted by Suu Quan <sq...@wwc.com>.
----- Original Message -----
From: "Diane Holt" <ho...@yahoo.com>
To: <an...@jakarta.apache.org>
Sent: Monday, May 21, 2001 3:16 PM
Subject: Re: Why does <javac> recompile even source not modified?
> Use:
> <target name="utils">
> <javac srcdir="/stp" destdir="/stp"
> includes="util/*.java"
> excludes="util/Copy.java"
> verbose="yes/>
> </target>
>
> IOW: The "srcdir" attr should point up to where the package hierarchy
> begins, and the filenames should begin with the package hierarchy -- it's
> how it matches source-files to class-files.
Diane
Man, you're good. Fixed my build file and it worked.
What do I owe you so far?
Re: Why does recompile even source not modified?
Posted by Diane Holt <ho...@yahoo.com>.
Use:
<target name="utils">
<javac srcdir="/stp" destdir="/stp"
includes="util/*.java"
excludes="util/Copy.java"
verbose="yes/>
</target>
IOW: The "srcdir" attr should point up to where the package hierarchy
begins, and the filenames should begin with the package hierarchy -- it's
how it matches source-files to class-files.
Diane
--- Suu Quan <sq...@wwc.com> wrote:
> In my attempt to understand javac, I have set a task to compile a few
> java
> files
> in a package util.* (project name is 'stp')
>
> <target name='utils'>
> <javac srcdir="/stp/utils" destdir='/stp'
> includes='*.java' verbose='yes'
> excludes='Copy.java'
> />
> </target>
> The first compile went OK. The subsequent times I ran ant again, it does
> recompile
> all the class files.
> Note that each java file has the declaration 'package utils;' in them.
>
> Sample output for one file
> [javac] [checking utils.MediatedThreadIf]
> [javac] [wrote C:\stp\utils\MediatedThreadIf.class]
>
> What did I do wrong
> Thanks in advance
>
=====
(holtdl@yahoo.com)
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/