ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Humphrey Sheil <Humphrey.Sh...@Kadius.com>
Subject add a package declaration (was RE: Javac task questions: deprecat ed file copying?)
Date Mon, 24 Jul 2000 10:04:17 GMT
I was running into the same problem.  The include property isn't supported
in my current version of ant (1.1), and the javadoc makes no mention of it
either... do I need to get something from cvs?

Anyhow, that wasn't the problem.  Turns out the offending classes exist
within a package structure but have no package declaration, so ant was
behaving correctly.  At each successive compile time, there existed no class
file since it didn't no where to put it the last time it ran, so it got
recompiled.  Try adding a package declaration, it should work fine then
(I've also seen IDEs etc. get confused when classes don't live in a
package).

I would like to be able to specify this include property to Javac though -
any ideas?

Humphrey

-----Original Message-----
From: Conor MacNeill [mailto:conor@m64.com]
Sent: 23 July 2000 15:36
To: ant-dev@jakarta.apache.org
Subject: RE: Javac task questions: deprecated file copying?


Laird,

Use an include in Javac to select only java files
<javac ...>
   <include name="**/*.java"/>
</javac>

That should eliminate the copying of support files and the warning.

BTW, How would people feel about actually removing this behaviour, now that
we have a release?

Conor


> -----Original Message-----
> From: Laird Nelson [mailto:ljnelson@unix.amherst.edu]
> Sent: Saturday, 22 July 2000 5:56
> To: ant-dev@jakarta.apache.org
> Subject: Javac task questions: deprecated file copying?
>
>
> I'm having a bit of trouble with the javac task.
>
> As I understand it, if I invoke it at the top of a source tree,
> it will comb
> through the directory tree, javac *.java in there, will find every other
> file in there and add it to a list of files to be copied, and will finally
> ensure that both the resulting .class files and the "support"
> files will be
> copied to destdir.
>
> When it does this, it tells me that this behavior is deprecated, and then
> proceeds to do it anyway.  That's fine that it's deprecated; I think the
> copying of extra support files automatically is silly and I want
> to turn it
> off.  However, I can't seem to see a way to turn it off.  The excludes
> attribute does not seem to prevent the javac task from picking extra stuff
> up.
>
> Additionally, on a slightly different topic, although CVS files
> are excluded
> by default, files found in, e.g., CVS/Base are not.  Since
> anytime you do a
> cvs edit (I think) a copy of the file being edited ends up in
> CVS/Base, then
> that file gets included in the compile run.  Ick.  The workaround is to do
> excludes="**/CVS/**".
>
> Thanks,
> Laird
>
>

Mime
View raw message