ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Glick <>
Subject Re: Couple of mods to <javac>
Date Tue, 12 Sep 2000 18:03:09 GMT
> > but it doesn't work for files that aren't part of a package.
> > Those files should be able to live in the source tree wherever it makes
> > sense for them to, since the compilers don't require they live any
> > particular place -- but currently, <javac> does.

Either add a package statement to your packageless classes (usually a
good idea anyway), or if that is not practical, put them in a separate
source tree and compile them separately, or if they must be in the main
source tree, exclude them from the normal compile and compile them
separately with src="..." set to the subdirectory.

Conor MacNeill wrote:
> Well, actually the compilers will assume that classes in the default package
> live at the root of the source tree. When that is the case it can handle
> dependencies which involve those classes. In other words, from my point of
> view, the only place that makes sense for classes in the default package to
> reside is at the root of the source tree. Of course, I don't know what other
> considerations come into play in your environment but I wonder why classes
> in the default package exist in other parts of your tree. You say that makes
> sense, but I'm not sure how.
> To me it would allow people to adopt what I feel is a bad practice. I guess
> I'd like to see if anyone else wants it before we would go ahead.

BTW the NetBeans IDE makes the same assumption Ant does about the
relation of source file location to package, and I think it has turned
out to be the right decision, even if it requires some "reeducation" for
users accustomed to doing things differently. So many problems just
vanish if you enforce this requirement.

So -1 from me, FWIW...Ant ought not be made more complicated to support
deprecated practices with easy workarounds. (Now if only the Swing demos
would be fixed with this in mind...)


Jesse Glick   <>
NetBeans, Open APIs  <>
tel (+4202) 3300-9161 Sun Micro x49161 Praha CR

View raw message