ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Pearlman Spencer" <>
Subject RE: Still having problems with javac source file location
Date Wed, 07 Nov 2001 15:37:38 GMT
Could it help to use / instead of \?
Also, maybe try a fileset instead.
I usually revert to a simpler task when I get into this, maybe try
a copy and make sure it is finding something.

-----Original Message-----
From: Peter Donald []
Sent: 07 November 2001 15:28
To: Ant Users List
Subject: Re: Still having problems with javac source file location

What version of ant are you using. An *ancient* version would not
files in certain conditions. Try going "ant -version" and if it doesn't 
report 1.4(.1) then you probably need to upgrade.

On Thu, 8 Nov 2001 02:18, wrote:
> I've asked about this before, but I've tried a few more things, and
> gathered some more info, so here I go again! I'm still having problems
> getting the javac task to correctly find the desired source files,
> them up against the correct target files, and build only whats needed.
> Based on reading the documentation and the FAQ on the website(
> the bit about always recompiling files that Peter Donald mentioned )
> what I've tried:
> Directory structure:
> d:\netserver
>   source
>     com
>       dstsystems
>         awd
>           util
>   classes
>     com
>       dstsystems
>         awd
>           util
> In source\com\dstsystems\awd\util I have a source file,
When it
> gets compiled, I want the .class file to be in
> classes\com\dstsystems\awd\util. Given that, here's how I coded the
> task:
> <javac
>       srcdir="d:\netserver\source"
>       destdir="d:\netserver\classes" >
>     <include name="com\dstsystems\awd\util\*.java"  />
> </javac>
> I've tried running ant with this both from d:\netserver\source and d:
> \netserver\source\com\dstsystems\awd\util.  Both times I get the same
> result.  Nothing gets built.There are 40 .java files in the util
> and none of the class files get built.  I set the javac task up this
> based on a note at the bottom of the Javac task documentation that
>     If you wish to compile only source-files located in some packages
>     a common root you should not include these packages in the
>     srcdir-attribute. Use include/exclude-attributes or elements to
>     for these packages. If you include part of your package-structure
>     inside the srcdir-attribute (or nested src-elements) Ant will
start to
>     recompile your sources every time you call it.
> The result I get when I run ant( with -debug ) is the following
>      FileSet: Setup file scanner in dir D:\netserver\source with
>      { includes: [com\dstsystems\awd\util\*.java] excludes: [] }
> Which seems to indicate that what I've done should have javac looking
> the correct directory.  But no files get compiled.
> Sorry about detailing the trivia, but this is driving me nuts. I'm
> I've screwed up something up, and its most likely a little thing that
> wouldn't even consider so I don't want to leave anything out.



Duct tape is like the force.  It has a light side, and a dark side, and
it binds the universe together ...
                -- Carl Zwanzig

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message