ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Lochart" <dloch...@capecomputing.com>
Subject Re: Javac task skips inner classes
Date Fri, 23 Jan 2004 19:27:02 GMT
Not knowing how your development procedure is laid out I can only comment on
how I do it.
First off I separate code as best I can into cohesive projects being very
careful about cross project
dependencies.  Thus I don't have to compile everything all the time unless I
am doing a release.
When I want to compile everything fresh I have a CVS deployment repository
that contains ant
deploymnet scripts for each major product that we have.  From there I select
a product and kick off
a build.  This will delete all files for that project in the cvs working
directory and then do a fresh checkout
from CVS of the source and then do a rebuild.  If you don't have a structure
like this you can still accomplish this by
creating a "clean" target that deletes all class files (and jars) from your
classes directory or wherever they happen to
live when they are built.

As an aside your inner class problem may reside in your classpath but this
is only a theory.
We maintain jars for each project that is built.  When a project is being
rebuilt if you include that jar in your classpath (by mistake or design)
javac may find it in the jar and not rebuild it.  It may rebuild the main
class based on dependency rules but I do
not know if those same dependency rules apply to inner classes.

good luck

Doug

Now I've gained some understanding
Of the only world that we see.
Things that I once dreamed of
Have become reality.

These walls that still surround me
Still contain the same old me,
Just one more who's searching for
A world that ought to be.
----- Original Message ----- 
From: "Clifton C. Craig" <ccc@icsaward.com>
To: "Ant Users List" <user@ant.apache.org>
Sent: Friday, January 23, 2004 1:18 PM
Subject: Javac task skips inner classes


> I have an issue where I run <javac> over a .java file with an inner
> class and the inner class is not generated. My build process involves a
> lot of Java comppiles and I'm not sure exactly where things get out of
> step. What I do know is occasionally when a bug slips into our source
> control head rev it causes our compile task (which runs over a fileset
> containing all of our source) to stop abruptly while the rest of the
> build continues. (failonerror=no) I then notice that a couple of files
> with inner classes are partially compiled. That is their corresponding
> class files are present but their inner class .class files are not. An
> attempt to run <javac> over just the .java file or files that are
> incomplete does nothing and I assume it's probably because of <javac>'s
> dependancy checking where it see's the corresponding .class file for the
> .java and does nothing. An attempt to run <javac> over the .java after
> the .class is deleted creates both the class and inner class for the
> file. This is sometimes annoying as we sometimes need to test the rest
> of the app while one little bug is being fixed by another developer. It
> becomes a hard-ship to nail down exactly which class files were skipped
> due to a minor bug. Is there a way to turn off dependancy checking for
> javac and force it to compile all classes regardless of whether they
> already have an existing .java file? Also could someone explain how a
> .java file with an inner class can be partially compiled like this?
>
> -- 
> Clifton C. Craig, Software Engineer
> Intelligent Computer Systems -  A Division of GBG
> 2101 Embassy Drive
> Lancaster, PA  17603
>
> Phone:  717-295-7977 ext. 621
> Fax:  717-295-7683
> ccc@icsaward.com
> ccraig@globalbeveragegroup.com
>
****************************************************************************
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>


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


Mime
View raw message