« Return to Thread: rebuilds even if source not changed

Re: <javac> rebuilds even if source not changed

by Jean-Rene David-3 :: Rate this Message:

Reply to Author | View in Thread

* Steve Loughran [2008.04.28 06:00]:
> Jean-Rene David wrote:
>> [...]
>> But the <javac> task doesn't recurse the hierarchy
>> to find the class file. It only looks in the
>> "destdir" itself. So if I just:
>>
>> $ touch foo/Welcome.class
>
> you must move the class under the package name it is in.

Of course. It works now. Thanks.

For posterity:

$ find
.
./build.xml
./src
./src/My
./src/My/Class
./src/My/Class/Welcome.java

$ ant
Buildfile: build.xml

build:
    [mkdir] Created dir: /data/home/jrdavid/work/java-practice/build
    [javac] Compiling 1 source file to /data/home/jrdavid/work/java-practice/build

BUILD SUCCESSFUL
Total time: 0 seconds

$ ant
Buildfile: build.xml

build:

BUILD SUCCESSFUL
Total time: 0 seconds

--
JR

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

 « Return to Thread: rebuilds even if source not changed