Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > ant keeps compiling

Reply
Thread Tools

ant keeps compiling

 
 
Sam Takoy
Guest
Posts: n/a
 
      08-17-2010
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
 
Reply With Quote
 
 
 
 
John B. Matthews
Guest
Posts: n/a
 
      08-17-2010
In article <i4dck3$ekh$>,
Sam Takoy <> 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>
 
Reply With Quote
 
 
 
 
Sam Takoy
Guest
Posts: n/a
 
      08-17-2010
On 8/17/2010 11:40 AM, John B. Matthews wrote:
> In article<i4dck3$ekh$>,
> Sam Takoy<> 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
>

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".
 
Reply With Quote
 
John B. Matthews
Guest
Posts: n/a
 
      08-17-2010
In article <i4ec5a$8rd$>,
Sam Takoy <> wrote:

> On 8/17/2010 11:40 AM, John B. Matthews wrote:
> > In article<i4dck3$ekh$>,
> > Sam Takoy<> 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>

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

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
jarsigner can't rename, ant keeps compiling Sam Takoy Java 3 08-17-2010 06:41 PM
Run ant script from ant script? lionelv@gmail.com Java 6 07-26-2007 02:12 AM
error runing ant in eclipse ant view yihucd@gmail.com Java 1 03-07-2006 08:39 PM
trouble with Hibernate and Ant (probably just Ant) john martin Java 2 04-07-2005 09:27 PM
wondering how i can launch tomcat from ant without ant hanging... Chris Bedford Java 6 12-23-2004 12:41 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57