ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Pearlman Spencer" <Alan.PearlmanSpen...@Mobileaware.com>
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.
Alan.

-----Original Message-----
From: Peter Donald [mailto:donaldp@apache.org]
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
compile 
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, MARobertson@dstsystems.com 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,
match
> them up against the correct target files, and build only whats needed.
> Based on reading the documentation and the FAQ on the website(
specifically
> the bit about always recompiling files that Peter Donald mentioned )
here's
> 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, log.java.
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
javac
> 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
directory,
> and none of the class files get built.  I set the javac task up this
way
> based on a note at the bottom of the Javac task documentation that
said
>
>     If you wish to compile only source-files located in some packages
below
>     a common root you should not include these packages in the
>     srcdir-attribute. Use include/exclude-attributes or elements to
filter
>     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
message:
>
>      FileSet: Setup file scanner in dir D:\netserver\source with
patternSet
>      { includes: [com\dstsystems\awd\util\*.java] excludes: [] }
>
> Which seems to indicate that what I've done should have javac looking
in
> the correct directory.  But no files get compiled.
>
> Sorry about detailing the trivia, but this is driving me nuts. I'm
sure
> I've screwed up something up, and its most likely a little thing that
I
> wouldn't even consider so I don't want to leave anything out.

-- 
Cheers,

Pete

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:
<mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:ant-user-help@jakarta.apache.org>

Mime
View raw message