ant keeps compiling

S

Sam Takoy

Hi,

I have about 200 files in my source tree. I compile by ant:

<target name="source" depends="init" description="compile the source " >
<javac srcdir="${src}" destdir="${build}" debug="on"
includeantruntime="false">
<classpath>
<fileset dir="${home}/code/lib" includes="*.jar"/>
<fileset dir="${home}/tomcat/lib" includes="*.jar"/>
</classpath>
<!-- <compilerarg line="-Xlint:unchecked"/> -->
</javac>
</target>


Even if I do "ant" consecutively, I get

source:
[javac] Compiling 1 source file to C:\pg\code\bak\ProjectA\classes

There keeps being 1 file that keeps compiling, even if I changed
nothing. I know which file it is (DatePicker.java) and there is nothing
different about it. Its time signature is 12/2007 right in the middle of
all other files. What might be causing this OCD behavior?

Thanks in advance,

Sam
 
J

John B. Matthews

[...]
source:
[javac] Compiling 1 source file to C:\pg\code\bak\ProjectA\classes

There keeps being 1 file that keeps compiling, even if I changed
nothing. I know which file it is (DatePicker.java) and there is
nothing different about it. Its time signature is 12/2007 right in
the middle of all other files. What might be causing this OCD
behavior?

Here's one scenario: a non-public, top-level class in a differently
named file.

$ cat src/NewMain.java
class NewMain {

public static void main(String[] args) {
System.out.println(new Hello().toString());
}

}
$ cat src/NewClass.java
class Hello {
public Hello() {
System.out.println("Hi!");
}
}

$ ant run
[...]
-do-compile:
[javac] Compiling 1 source file to [...]/build/classes
[...]
run:
[java] Hi!
[java] Hello@71f6f0bf
 
S

Sam Takoy

[...]
source:
[javac] Compiling 1 source file to C:\pg\code\bak\ProjectA\classes

There keeps being 1 file that keeps compiling, even if I changed
nothing. I know which file it is (DatePicker.java) and there is
nothing different about it. Its time signature is 12/2007 right in
the middle of all other files. What might be causing this OCD
behavior?

Here's one scenario: a non-public, top-level class in a differently
named file.

$ cat src/NewMain.java
class NewMain {

public static void main(String[] args) {
System.out.println(new Hello().toString());
}

}
$ cat src/NewClass.java
class Hello {
public Hello() {
System.out.println("Hi!");
}
}

$ ant run
[...]
-do-compile:
[javac] Compiling 1 source file to [...]/build/classes
[...]
run:
[java] Hi!
[java] Hello@71f6f0bf
Thanks. That wasn't it, but it forced me to look at the content of the
file and I discovered what we wrong. See my post "jarsigner can't
rename, ant keeps compiling".
 
J

John B. Matthews

Sam Takoy said:
[...]
source:
[javac] Compiling 1 source file to C:\pg\code\bak\ProjectA\classes

There keeps being 1 file that keeps compiling, even if I changed
nothing. I know which file it is (DatePicker.java) and there is
nothing different about it. Its time signature is 12/2007 right in
the middle of all other files. What might be causing this OCD
behavior?

Here's one scenario: a non-public, top-level class in a differently
named file.
[...]
Thanks. That wasn't it, but it forced me to look at the content of
the file and I discovered what we wrong. See my post "jarsigner can't
rename, ant keeps compiling".

Excellent. Can you elaborate?

<http://groups.google.com/group/comp.lang.java.programmer/browse_frm/thread/bc737c2fa36d9214>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top