Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ant keeps compiling

8 views
Skip to first unread message

Sam Takoy

unread,
Aug 17, 2010, 3:09:53 AM8/17/10
to
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

John B. Matthews

unread,
Aug 17, 2010, 11:40:43 AM8/17/10
to
In article <i4dck3$ekh$1...@news.eternal-september.org>,
Sam Takoy <sam....@yahoo.com> wrote:

[...]


> 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

--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>

Sam Takoy

unread,
Aug 17, 2010, 12:08:10 PM8/17/10
to
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".

John B. Matthews

unread,
Aug 17, 2010, 2:35:58 PM8/17/10
to
In article <i4ec5a$8rd$2...@news.eternal-september.org>,
Sam Takoy <sam....@yahoo.com> wrote:

> On 8/17/2010 11:40 AM, John B. Matthews wrote:
> > In article<i4dck3$ekh$1...@news.eternal-september.org>,
> > Sam Takoy<sam....@yahoo.com> wrote:
> >
> > [...]
> >> 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>

0 new messages